Skip to content

NavigationView Header gets cut off in Minimal PaneDisplayMode when back and paneToggle buttons are hidden #10489

@bmrc01

Description

@bmrc01

Describe the bug

When the NavigationView enters Minimal PaneDisplayMode and both IsBackButtonVisible="Collapsed" and IsPaneToggleButtonVisible="False" are set, the Header gets cut off instead of being properly aligned.

Image

Steps to reproduce the bug

  1. Create a new WinUI 3 application.

  2. Replace the content of MainWindow.xaml with the following code:

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>

    <TitleBar
        Height="{Binding ElementName=navView, Path=CompactPaneLength}"
        IsBackButtonVisible="True"
        IsPaneToggleButtonVisible="True" />

    <NavigationView
        x:Name="navView"
        Grid.Row="1"
        Header="Test"
        IsBackButtonVisible="Collapsed"
        IsPaneToggleButtonVisible="False">
        <Button x:Name="myButton" Click="myButton_Click" />
    </NavigationView>
</Grid>
  1. Run the application.

  2. Resize the window so that the NavigationView switches to Minimal PaneDisplayMode.

  3. Observe that the Header gets cut off instead of being properly aligned.

Expected behavior

The NavigationView header should remain fully visible and properly aligned when the control enters Minimal PaneDisplayMode, even when IsBackButtonVisible="Collapsed" and IsPaneToggleButtonVisible="False" are set.

Image

Screenshots

Image

NuGet package version

WinUI 3 - Windows App SDK 1.7.0: 1.7.250310001

Windows version

Windows 11 (24H2): Build 26100

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions