fix runtime cast

This commit is contained in:
Tian Liao 2024-04-24 16:01:53 +08:00
commit 294c14ec9f

View file

@ -93,8 +93,8 @@ namespace CalculatorApp
args.SplashScreen.Dismissed += async (_, __) => await SetupJumpListAsync(); args.SplashScreen.Dismissed += async (_, __) => await SetupJumpListAsync();
var minWindowWidth = (float)Resources["AppMinWindowWidth"]; var minWindowWidth = Convert.ToSingle(Resources["AppMinWindowWidth"]);
var minWindowHeight = (float)Resources["AppMinWindowHeight"]; var minWindowHeight = Convert.ToSingle(Resources["AppMinWindowHeight"]);
var minWindowSize = SizeHelper.FromDimensions(minWindowWidth, minWindowHeight); var minWindowSize = SizeHelper.FromDimensions(minWindowWidth, minWindowHeight);
ApplicationView appView = ApplicationView.GetForCurrentView(); ApplicationView appView = ApplicationView.GetForCurrentView();