Skip to content

Commit b3b8ef6

Browse files
committed
Improve NavigationView Icons Quality
1 parent 7cd51b2 commit b3b8ef6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dev/DevWinUI/Services/NavigationService/Services/JsonNavigationService/JsonNavigationService.NavigationView.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Microsoft.UI.Xaml.Automation;
2+
using Microsoft.UI.Xaml.Media.Imaging;
23

34
namespace DevWinUI;
45
public partial class JsonNavigationService
@@ -175,7 +176,7 @@ private IconElement GetIcon(string imagePath, string iconGlyph)
175176

176177
if (!string.IsNullOrEmpty(imagePath))
177178
{
178-
return new BitmapIcon() { UriSource = new Uri(imagePath, UriKind.RelativeOrAbsolute), ShowAsMonochrome = false };
179+
return new ImageIcon() { Source = new BitmapImage(new Uri(imagePath, UriKind.RelativeOrAbsolute))};
179180
}
180181

181182
return null;

0 commit comments

Comments
 (0)