File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -89,9 +89,10 @@ public float AppThemeBackgroundImageOpacity
8989 => AppearanceSettingsService . AppThemeBackgroundImageOpacity ;
9090
9191 public ImageSource ? AppThemeBackgroundImageSource =>
92- string . IsNullOrEmpty ( AppearanceSettingsService . AppThemeBackgroundImageSource )
93- ? null
94- : new BitmapImage ( new Uri ( AppearanceSettingsService . AppThemeBackgroundImageSource , UriKind . RelativeOrAbsolute ) ) ;
92+ ! string . IsNullOrEmpty ( AppearanceSettingsService . AppThemeBackgroundImageSource ) &&
93+ Uri . TryCreate ( AppearanceSettingsService . AppThemeBackgroundImageSource , UriKind . RelativeOrAbsolute , out Uri ? validUri )
94+ ? new BitmapImage ( validUri )
95+ : null ;
9596
9697 public VerticalAlignment AppThemeBackgroundImageVerticalAlignment
9798 => AppearanceSettingsService . AppThemeBackgroundImageVerticalAlignment ;
You can’t perform that action at this time.
0 commit comments