Get the OpenPaneLength from the resource

This commit is contained in:
Han Zhang 2021-07-22 14:34:54 +08:00
commit f24ca72c86
2 changed files with 2 additions and 1 deletions

View file

@ -333,6 +333,7 @@
<FontFamily x:Key="CalculatorFontFamily">ms-appx:///Assets/CalculatorIcons.ttf#Calculator Fluent Icons</FontFamily>
<x:Double x:Key="SplitViewOpenPaneLength">256</x:Double>
<Thickness x:Key="PivotPortraitThemePadding">0,1,0,0</Thickness>
<x:Double x:Key="PivotHeaderItemFontSize">14</x:Double>
<FontWeight x:Key="PivotHeaderItemThemeFontWeight">Normal</FontWeight>

View file

@ -606,7 +606,7 @@ namespace CalculatorApp
private double NavigationViewOpenPaneLength(bool isAlwaysOnTop)
{
return isAlwaysOnTop ? 0 : 256;
return isAlwaysOnTop ? 0 : (double)Application.Current.Resources["SplitViewOpenPaneLength"];
}
private CalculatorApp.Calculator m_calculator;