From 294c14ec9f723d2e20cf4e01e41a934f31170de4 Mon Sep 17 00:00:00 2001 From: Tian Liao Date: Wed, 24 Apr 2024 16:01:53 +0800 Subject: [PATCH] fix runtime cast --- src/Calculator/App.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Calculator/App.xaml.cs b/src/Calculator/App.xaml.cs index 13e03f99..449ce6db 100644 --- a/src/Calculator/App.xaml.cs +++ b/src/Calculator/App.xaml.cs @@ -93,8 +93,8 @@ namespace CalculatorApp args.SplashScreen.Dismissed += async (_, __) => await SetupJumpListAsync(); - var minWindowWidth = (float)Resources["AppMinWindowWidth"]; - var minWindowHeight = (float)Resources["AppMinWindowHeight"]; + var minWindowWidth = Convert.ToSingle(Resources["AppMinWindowWidth"]); + var minWindowHeight = Convert.ToSingle(Resources["AppMinWindowHeight"]); var minWindowSize = SizeHelper.FromDimensions(minWindowWidth, minWindowHeight); ApplicationView appView = ApplicationView.GetForCurrentView();