Titlebar improvements

This commit is contained in:
Laute 2021-11-07 14:59:27 +01:00
parent 9ad691a282
commit 5fce8863d8
3 changed files with 16 additions and 3 deletions

View file

@ -32,6 +32,9 @@ namespace Microsoft.PowerToys.Settings.UI.WinUI3
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
{
m_window = new MainWindow();
//m_window.ExtendsContentIntoTitleBar = true;
//m_window.SetTitleBar(m_window.CustomTitleBar); // This should work according to docs, but it doesn't.... So disabling for now together with ExtendsContentIntoTitleBar
m_window.Title = "PowerToys Settings";
m_window.Activate();
}

View file

@ -7,7 +7,17 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<local:ShellPage/>
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<!--<Grid.RowDefinitions>
<RowDefinition Height="36"/>
<RowDefinition Height="*" />
</Grid.RowDefinitions>-->
<!--<Grid x:Name="CustomTitleBar" HorizontalAlignment="Stretch">
<StackPanel Orientation="Horizontal" Grid.ColumnSpan="2" VerticalAlignment="Top" Margin="16,8,8,8">
<Image Source="ms-appx:///Assets/FluentIcons/FluentIconsPowerToys.png" Width="16" />
<TextBlock Style="{StaticResource CaptionTextBlockStyle}" Margin="12,0,0,0" Text="PowerToys" />
</StackPanel>
</Grid>-->
<local:ShellPage Grid.Row="1"/>
</Grid>
</Window>

View file

@ -19,7 +19,7 @@
</i:Interaction.Behaviors>
<Grid x:Name="RootGrid"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
>
<muxc:NavigationView x:Name="navigationView"
IsBackButtonVisible="Collapsed"