-
Notifications
You must be signed in to change notification settings - Fork 693
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
ImageIconSource can not load svg within IconSourceElement #10081
Comments
PathIcon can be used to load SVG (C++ version):
|
I tested with an InfoBadge and it worked (Windows 10 22H2, Windows App SDK 1.6.240829007) :
=> |
Yes, you are right. but i want use it in IconSourceElement, it dosen't work. |
As @mareksm said, you can use Path, like PathIconSource For example, I copied the path from my star.svg for the test, but you could extract it into a string and bind it :
A quick function from ChatGPT to extact the path from .svg file :
|
thanks for reply. but for my case, i need to do all in cs code. the data of path can not set via code like this. |
Describe the bug
Can not load svg via ImageIconSource and IconSourceElement like:
or
but the Image and ImageIcon work:
Steps to reproduce the bug
follow above.
Expected behavior
No response
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.6.1: 1.6.240923002
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response
The text was updated successfully, but these errors were encountered: