We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88ef27f commit ae8b01cCopy full SHA for ae8b01c
2 files changed
CommunityToolkit.App.Shared/Assets/DefaultControlIcon.png
6.05 KB
CommunityToolkit.App.Shared/Helpers/IconHelper.cs
@@ -9,6 +9,7 @@ namespace CommunityToolkit.App.Shared.Helpers;
9
public static class IconHelper
10
{
11
internal const string SourceAssetsPrefix = "ms-appx:///SourceAssets/";
12
+ internal const string FallBackControlIconPath = "ms-appx:///Assets/ControlIcons/Control.png";
13
14
public static IconElement? GetCategoryIcon(ToolkitSampleCategory category)
15
@@ -25,8 +26,15 @@ public static class IconHelper
25
26
return iconElement;
27
}
28
- public static string GetIconPath(string IconPath)
29
+ public static string GetIconPath(string? IconPath)
30
- return SourceAssetsPrefix + IconPath;
31
+ if (!string.IsNullOrEmpty(IconPath))
32
+ {
33
+ return SourceAssetsPrefix + IconPath;
34
+ }
35
+ else
36
37
+ return FallBackControlIconPath;
38
39
40
0 commit comments