microsoft / microsoft/microsoft-ui-xaml
ImageIconSource can not load svg within IconSourceElement
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
Can not load svg via ImageIconSource and **IconSourceElement** like:
```xml
```
or
```csharp
var element = new IconSourceElement();
var source = new ImageIconSource() {
ImageSource = new SvgImageSource(new Uri("ms-appx:///Assets/Svg/360.svg"))
};
element.IconSource = source;
```
but the Image and ImageIcon work:
```xml
```
### 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_
Contributor guide
Research direction
Start by reproducing the issue with IconSourceElement and ImageIconSource using the XML and C# examples in the report on WinUI 3 / Windows App SDK 1.6.1. Compare the SVG behavior with the working Image and ImageIcon examples; done means the SVG loads through both IconSourceElement usage patterns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100