NavigationViewItem template should respect CompactPaneLength
See original GitHub issueDescribe the bug
The NavigationViewItem are partially hidden by the MenuItemsHost’s scrollbar when `NavigationView.PaneDisplayMode=“LeftCompact”.
Steps to reproduce the bug
- Create a new app with a
NavigationViewcontaining a lot ofNavigationViewItems
<mux:NavigationView PaneDisplayMode="LeftCompact">
<mux:NavigationView.MenuItems>
<mux:NavigationViewItem Content="Item 1">
<mux:NavigationViewItem.Icon>
<SymbolIcon Symbol="Add" />
</mux:NavigationViewItem.Icon>
</mux:NavigationViewItem>
[…]
<mux:NavigationViewItem Content="Item 9">
<mux:NavigationViewItem.Icon>
<SymbolIcon Symbol="UnPin" />
</mux:NavigationViewItem.Icon>
</mux:NavigationViewItem>
</mux:NavigationView.MenuItems>
</mux:NavigationView>
- Run the application
- Resize the window to force the
MenuItemsHostto show its scrollbar
Expected behavior The scrollbar is displayed on the edge and not covering the icons.
Screenshots
Actual bevavior

Notice that the icons are half hidden making it hard to determine what is each entry.
Expected bevahior
The screenshots come from Groove Music. Notice that the scrollbar is not hiding the icons:

Additional context
NavigationView has a CompactPaneLength property that seems to be useful to get what we need but it doesn’t give the expected result at all:
The label of the NavigationViewItem are shown and the hamburger and back icons are no longer centered.
Comparing the sample app and Groove, we can see that Groove is using a wider compact bar to have enough room for the scrollbar.

It would be great to have the same behavior in NavigationView to let the users properly see all the navigation icons when in compact mode;
Proposed fix [Edited by @YuliKl ] Update NavigationViewItem template to respect CompactPaneLength as the width of its first column. Also recenter the back and hamburger buttons when NavigationView is not in Top mode.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10 (7 by maintainers)

Top Related StackOverflow Question
I am suggesting this, yes. This is the Groove Music behavior that @vgromfeld noted. The decision to widen the sliver will be entirely up to the app, we won’t change the control’s default 40px width.
I believe today the icons are centered inside inside the template’s first column. Keeping them centered within a 40px strip while allowing the column’s width to be changed feels unnecessarily complex.
So, you invented design of control with only one option in mind and that is “Automatically hide scrollbars” in Windows Settings. You didn’t care how the control will behave with “Always enabled scrollbars” and basically it is impossible to fix now. That’s funny.
I really don’t understand obsession making basic window controls smaller/hidden/removed where vast majority of displays are > 1080p since Win10 was released and saving 10 more pixels but sacrifying usability.
Automatically hide scrollbars, who wants to wait until they show up…