Working on a UWP app that doesn't want a tittle bar, so the NavigationView will extend top to bottom.
Adding a border to the page that has NavigationView - toggle button does not work. So I added a grid and set it to Titlebar with height of 32 - doing so the toggle button works. But this adds a space for the titlebar of height 32(Which I dont want). So then I collapsed the Titlebar. NvaigationView toggle button works and there is no space between navview and border. Coz of this window dragging is not working. Any suggestions on how to approach this issue?
Below is my Code:
<Border BorderBrush="Red" BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<Grid x:Name="AppTitleBar" Background="Transparent" Visibility="Collapsed"/>
<NavigationView Grid.Row="1" Name="NaveView"
CompactModeThresholdWidth="200"
ExpandedModeThresholdWidth="10000"
IsSettingsVisible="True" IsPaneToggleButtonVisible="True" />
</Grid>
</Border>
Code Behind:
public MainPage()
{
this.InitializeComponent();
var coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
coreTitleBar.ExtendViewIntoTitleBar = true;
coreTitleBar.LayoutMetricsChanged += CoreTitleBar_LayoutMetricsChanged;
// Set XAML element as a draggable region.
Window.Current.SetTitleBar(AppTitleBar);
}
private void CoreTitleBar_LayoutMetricsChanged(CoreApplicationViewTitleBar sender, object args)
{
AppTitleBar.Height = sender.Height;
}