Repository navigation
Closed
Closed
Copy link
Labels
area/navigationview 🧭Categorizes an issue or PR as relevant to the NavigationView controlkind/bugSomething isn't workingproject/navigation-lifecycle 🧬Categorizes an issue or PR as relevant to the navigation and lifecycle (NavigationView, AppBar, ...)
Description
Current behavior
When change the NavigationView CompactPaneLength the Hamburger Menu still visible.
NavigationView.hamburger.menu.mp4
Expected behavior
When change the CompactPaneLength the menu hide as the others.
How to reproduce it (as minimally and precisely as possible)
Use the sample project
Or create a new app with toolkit
dotnet new unoapp -o UnoApp7 -toolkit -pub "UnoApp7"
Update the the current last version "Uno.Sdk": "6.1.0-dev.91" on global.json
Change the SkiaHostBuilder to UnoPlatformHostBuilder on the Program.cs
Change the MainPage.xaml content.
<Page x:Class="UnoApp7.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UnoApp7"
xmlns:utu="using:Uno.Toolkit.UI"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<ScrollViewer>
<Grid utu:SafeArea.Insets="VisibleBounds">
<StackPanel HorizontalAlignment="Stretch"
VerticalAlignment="Center">
<Grid RowDefinitions="50,*" ColumnDefinitions="50,*">
<TextBlock Text="{Binding Path=CompactPaneLength, ElementName=NavigationViewName}"/>
<Button Content="Increase 100 on CompactPaneLength"
Click="IncreaseValueOnCompactPaneLength_Click"
Grid.Column="1"/>
<TextBlock Grid.Row="1"
Text="{Binding Path=OpenPaneLength, ElementName=NavigationViewName}"/>
<Button Grid.Row="1"
Grid.Column="1"
Content="Increase 100 on OpenPaneLength"
Click="IncreaseValueOnOpenPaneLength_Click"/>
</Grid>
<NavigationView x:Name="NavigationViewName"
Background="Green"
CompactPaneLength="200"
OpenPaneLength="100"
IsPaneOpen="True"
HorizontalAlignment="Stretch">
<NavigationView.MenuItems>
<NavigationViewItem Content="Menu">
<NavigationViewItem.Icon>
<SymbolIcon Symbol="AddFriend" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem Content="Settings">
<NavigationViewItem.Icon>
<SymbolIcon Symbol="Setting" />
</NavigationViewItem.Icon>
</NavigationViewItem>
</NavigationView.MenuItems>
<NavigationView.Content>
<Grid Background="Red">
<TextBlock Text="Main content area!"
FontSize="24"
VerticalAlignment="Center"
HorizontalAlignment="Center"/>
</Grid>
</NavigationView.Content>
</NavigationView>
</StackPanel>
</Grid>
</ScrollViewer>
</Page>
and add to the MainPage.xaml.cs
private void IncreaseValueOnCompactPaneLength_Click(object sender, RoutedEventArgs e)
{
#if !WINDOWS
NavigationViewName.CompactPaneLength = NavigationViewName.CompactPaneLength + 100;
#endif
}
private void IncreaseValueOnOpenPaneLength_Click(object sender, RoutedEventArgs e)
{
#if !WINDOWS
NavigationViewName.OpenPaneLength = NavigationViewName.OpenPaneLength + 100;
//NavigationViewName.SetValue(NavigationView.OpenPaneLengthProperty, NavigationViewName.OpenPaneLength + 100);
#endif
}Click to Increase 100 on CompactPaneLength several times
Nuget Package: "6.1.0-dev.91"
Package Version(s):
Affected platform(s):
- WebAssembly
- Android
- iOS
- macOS (AppKit)
- Mac Catalyst
- Skia
- WPF
- GTK (Linux)
- Linux Framebuffer
- Tizen
- Windows
IDE:
- Visual Studio 2022
- Visual Studio 2019
- Visual Studio Code
- Visual Studio for Mac
- Rider Windows
- Rider macOS
Relevant plugins:
Anything else we need to know?
Metadata
Metadata
Assignees
Labels
area/navigationview 🧭Categorizes an issue or PR as relevant to the NavigationView controlkind/bugSomething isn't workingproject/navigation-lifecycle 🧬Categorizes an issue or PR as relevant to the navigation and lifecycle (NavigationView, AppBar, ...)
Activity
NavigationView#21054[-]NavigationView - Changing CompactPaneLength the Hamburger menu still visible[/-][+]`NavigationView` - Changing `CompactPaneLength` the Hamburger menu still visible[/+]github-actions commentedon May 12, 2026
This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.
test: Cover NavigationView fixes with runtime tests
MartinZikmund commentedon Jun 12, 2026
Verified as already resolved on current master: the
CompactPaneLength→TemplateSettings.PaneToggleButtonWidth/SmallerPaneToggleButtonWidth→ toggle-button chain now updates per WinUI behavior. A runtime test reproducing this scenario passes both at the current dev branch HEAD and at the base of #21132 (i.e. the fix landed earlier on master, before the NavigationView alignment work).A regression-guard runtime test (
When_CompactPaneLength_Changed_PaneToggleButton_Updates) is included in #21132.If the originally reported scenario still misbehaves for you on a current build, please comment with an updated repro and we will reopen.
test: Cover NavigationView fixes with runtime tests