File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ namespace CommunityToolkit.App.Shared.Helpers;
9
9
public static class IconHelper
10
10
{
11
11
internal const string SourceAssetsPrefix = "ms-appx:///SourceAssets/" ;
12
+ internal const string FallBackControlIconPath = "ms-appx:///Assets/ControlIcons/Control.png" ;
12
13
13
14
public static IconElement ? GetCategoryIcon ( ToolkitSampleCategory category )
14
15
{
@@ -25,8 +26,15 @@ public static class IconHelper
25
26
return iconElement ;
26
27
}
27
28
28
- public static string GetIconPath ( string IconPath )
29
+ public static string GetIconPath ( string ? IconPath )
29
30
{
30
- return SourceAssetsPrefix + IconPath ;
31
+ if ( ! string . IsNullOrEmpty ( IconPath ) )
32
+ {
33
+ return SourceAssetsPrefix + IconPath ;
34
+ }
35
+ else
36
+ {
37
+ return FallBackControlIconPath ;
38
+ }
31
39
}
32
40
}
You can’t perform that action at this time.
0 commit comments