diff --git a/WinUIGallery/App.xaml.cs b/WinUIGallery/App.xaml.cs
index 9a20c2252..f165b4360 100644
--- a/WinUIGallery/App.xaml.cs
+++ b/WinUIGallery/App.xaml.cs
@@ -94,7 +94,7 @@ protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs ar
IdleSynchronizer.Init();
startupWindow = WindowHelper.CreateWindow();
-
+ startupWindow.ExtendsContentIntoTitleBar = true;
#if DEBUG
//if (System.Diagnostics.Debugger.IsAttached)
//{
diff --git a/WinUIGallery/Navigation/NavigationRootPage.xaml b/WinUIGallery/Navigation/NavigationRootPage.xaml
index 2bdd28f7b..73fc8ec25 100644
--- a/WinUIGallery/Navigation/NavigationRootPage.xaml
+++ b/WinUIGallery/Navigation/NavigationRootPage.xaml
@@ -33,36 +33,38 @@
-
-
+
+
-
+
+
+
+
+
+
-
+
-
-
-
-
+
-
+
+
+
@@ -105,9 +107,6 @@
HeaderTemplate="{StaticResource NavigationViewHeaderTemplate}"
IsTabStop="False"
IsTitleBarAutoPaddingEnabled="False"
- PaneOpening="NavigationViewControl_PaneOpening"
- PaneClosing="NavigationViewControl_PaneClosing"
- DisplayModeChanged="NavigationViewControl_DisplayModeChanged"
SelectionChanged="OnNavigationViewSelectionChanged"
Loaded="OnNavigationViewControlLoaded">
diff --git a/WinUIGallery/Navigation/NavigationRootPage.xaml.cs b/WinUIGallery/Navigation/NavigationRootPage.xaml.cs
index 624a7611f..e823acfa5 100644
--- a/WinUIGallery/Navigation/NavigationRootPage.xaml.cs
+++ b/WinUIGallery/Navigation/NavigationRootPage.xaml.cs
@@ -338,7 +338,6 @@ private void OnNavigationViewSelectionChanged(Microsoft.UI.Xaml.Controls.Navigat
var item = (ControlInfoDataItem)selectedItem.DataContext;
Navigate(typeof(ItemPage), item.UniqueId);
}
-
}
}
}
@@ -499,33 +498,6 @@ public void EnsureItemIsVisibleInNavigation(string name)
}
}
- private void NavigationViewControl_PaneClosing(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewPaneClosingEventArgs args)
- {
- UpdateAppTitleMargin(sender);
- }
-
- private void NavigationViewControl_PaneOpening(Microsoft.UI.Xaml.Controls.NavigationView sender, object args)
- {
- UpdateAppTitleMargin(sender);
- }
-
- private void NavigationViewControl_DisplayModeChanged(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewDisplayModeChangedEventArgs args)
- {
- Thickness currMargin = AppTitleBar.Margin;
- if (sender.DisplayMode == Microsoft.UI.Xaml.Controls.NavigationViewDisplayMode.Minimal)
- {
- AppTitleBar.Margin = new Thickness() { Left = (sender.CompactPaneLength * 2), Top = currMargin.Top, Right = currMargin.Right, Bottom = currMargin.Bottom };
-
- }
- else
- {
- AppTitleBar.Margin = new Thickness() { Left = sender.CompactPaneLength, Top = currMargin.Top, Right = currMargin.Right, Bottom = currMargin.Bottom };
- }
-
- UpdateAppTitleMargin(sender);
- UpdateHeaderMargin(sender);
- }
-
private void UpdateAppTitleMargin(Microsoft.UI.Xaml.Controls.NavigationView sender)
{
const int smallLeftIndent = 4, largeLeftIndent = 24;
@@ -560,21 +532,6 @@ private void UpdateAppTitleMargin(Microsoft.UI.Xaml.Controls.NavigationView send
}
}
- private void UpdateHeaderMargin(Microsoft.UI.Xaml.Controls.NavigationView sender)
- {
- if (PageHeader != null)
- {
- if (sender.DisplayMode == Microsoft.UI.Xaml.Controls.NavigationViewDisplayMode.Minimal)
- {
- PageHeader.HeaderPadding = (Thickness)App.Current.Resources["PageHeaderMinimalPadding"];
- }
- else
- {
- PageHeader.HeaderPadding = (Thickness)App.Current.Resources["PageHeaderDefaultPadding"];
- }
- }
- }
-
private void CtrlF_Invoked(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs args)
{
controlsSearchBox.Focus(FocusState.Programmatic);
diff --git a/WinUIGallery/PageHeader.xaml b/WinUIGallery/PageHeader.xaml
index b6bc5aaae..dba04ed7e 100644
--- a/WinUIGallery/PageHeader.xaml
+++ b/WinUIGallery/PageHeader.xaml
@@ -10,26 +10,6 @@
HighContrastAdjustment="Auto">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/WinUIGallery/PageHeader.xaml.cs b/WinUIGallery/PageHeader.xaml.cs
index 0a85ceaf5..717610c2a 100644
--- a/WinUIGallery/PageHeader.xaml.cs
+++ b/WinUIGallery/PageHeader.xaml.cs
@@ -54,19 +54,6 @@ public object Subtitle
public static readonly DependencyProperty SubtitleProperty =
DependencyProperty.Register("Subtitle", typeof(object), typeof(PageHeader), new PropertyMetadata(null));
-
-
- public Thickness HeaderPadding
- {
- get { return (Thickness)GetValue(HeaderPaddingProperty); }
- set { SetValue(HeaderPaddingProperty, value); }
- }
-
- // Using a DependencyProperty as the backing store for BackgroundColorOpacity. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty HeaderPaddingProperty =
- DependencyProperty.Register("HeaderPadding", typeof(Thickness), typeof(PageHeader), new PropertyMetadata((Thickness)App.Current.Resources["PageHeaderDefaultPadding"]));
-
-
public double BackgroundColorOpacity
{
get { return (double)GetValue(BackgroundColorOpacityProperty); }