Merge branch 'feature/winui2.6' into user/kg/fixstyle

This commit is contained in:
Kenny Guo 2021-07-22 15:15:54 +08:00 committed by GitHub
commit a74dadacd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

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

@ -588,6 +588,11 @@ namespace CalculatorApp
return !isAlwaysOnTop && isPopupOpen ? Visibility.Visible : Visibility.Collapsed;
}
private double NavigationViewOpenPaneLength(bool isAlwaysOnTop)
{
return isAlwaysOnTop ? 0 : (double)Application.Current.Resources["SplitViewOpenPaneLength"];
}
private CalculatorApp.Calculator m_calculator;
private GraphingCalculator m_graphingCalculator;
private CalculatorApp.UnitConverter m_converter;