Fixed the display issue in AOT mode

This commit is contained in:
Han Zhang 2021-07-22 13:17:25 +08:00
commit 226e555d92
3 changed files with 6 additions and 2 deletions

View file

@ -333,7 +333,6 @@
<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

@ -101,7 +101,7 @@
ItemInvoked="OnNavItemInvoked"
Loaded="OnNavLoaded"
MenuItemsSource="{x:Bind CreateUIElementsForCategories(Model.Categories), Mode=OneWay}"
OpenPaneLength="{StaticResource SplitViewOpenPaneLength}"
OpenPaneLength="{x:Bind NavigationViewOpenPaneLength(Model.IsAlwaysOnTop), Mode=OneWay}"
PaneClosed="OnNavPaneClosed"
PaneOpened="OnNavPaneOpened"
SelectionChanged="OnNavSelectionChanged"

View file

@ -604,6 +604,11 @@ namespace CalculatorApp
}
}
private double NavigationViewOpenPaneLength(bool isAlwaysOnTop)
{
return isAlwaysOnTop ? 0 : 256;
}
private CalculatorApp.Calculator m_calculator;
private GraphingCalculator m_graphingCalculator;
private CalculatorApp.UnitConverter m_converter;