Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG image does not support styling via class #3941

Closed
zed220 opened this issue Jan 13, 2021 · 4 comments
Closed

SVG image does not support styling via class #3941

zed220 opened this issue Jan 13, 2021 · 4 comments
Labels
area-Images Images, SVG product-winui3 WinUI 3 issues team-Rendering Issue for the Rendering team

Comments

@zed220
Copy link

zed220 commented Jan 13, 2021

I have created a sample WinUI on UWP project.
SVG image does not support styling via class

Steps to reproduce the bug
App22.zip

  1. Open attached project.
  2. Run

Expected behavior
The circle should be green.

Screenshots
image

Version Info

NuGet package version:
[Microsoft.WinUI 3.0.0-preview3.201113.0]

Windows app type:

UWP Win32
Yes
Windows 10 version Saw the problem?
May 2020 Update (19041) Yes
Device form factor Saw the problem?
Desktop Yes

Additional context

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Jan 13, 2021
@StephenLPeters StephenLPeters added area-Images Images, SVG team-Rendering Issue for the Rendering team product-winui3 WinUI 3 issues labels Jan 14, 2021
@codendone
Copy link
Contributor

Yes, the current SVG support does not support styles. See #625 for more info.

@BorzillaR
Copy link

btw, is any way to bind some svg colors to the system brushes? I want to use the svg icons in the toolbar items and cant find a way to change theirs colors depending on the current theme (Light, Dark)

@codendone
Copy link
Contributor

The only way I can think of to map to system colors would be to load the svg file into a buffer, lookup the color RGB values you need, search and replace them in the svg buffer, and then load that. Of course, you'll need to listen for theme changes and repeat this process when that happens.

@codendone
Copy link
Contributor

Closing this as a duplicate of a feature proposal asking for styling: #507.

@ghost ghost removed the needs-triage Issue needs to be triaged by the area owners label Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Images Images, SVG product-winui3 WinUI 3 issues team-Rendering Issue for the Rendering team
Projects
None yet
Development

No branches or pull requests

4 participants