How to disable NavigationView content scrollbar
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 9.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
How can I disable the scrollbar that appears when displaying a NavigationViewItem when using NavigationView?
To Reproduce
<ui:NavigationView
x:Name="RootNavigation"
Grid.Row="1"
BorderBrush="Transparent"
BorderThickness="1"
Loaded="NavigationView_Loaded"
PaneDisplayMode="LeftFluent">
<ui:NavigationView.MenuItems>
<ui:NavigationViewItem TargetPageType="{x:Type views:HomePage}">
<ui:NavigationViewItem.Icon>
<ui:SymbolIcon Symbol="Home24" />
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
</ui:NavigationView.MenuItems>
</ui:NavigationView>
<Grid>
<StackPanel
MaxHeight="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType=Window}}"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<ui:TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="24"
Foreground="Black"
Text="Text>>>" />
<ui:TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="24"
Foreground="Black"
Text="Text>>>" />
...... more TextBlock
</StackPanel>
</Grid>
Expected behavior
The navigationview's scrollbar has disappeared. I can control whether a portion of the scrollbar is displayed within the page.
Screenshots
OS version
Windows11
.NET version
.net 8
WPF-UI NuGet version
4.1.0
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The reproduction uses NavigationView, NavigationViewItem, and a HomePage XAML view in WPF-UI 4.1.0. Start by reproducing the scrollbar behavior with the provided markup, then trace the NavigationView content presenter and related styling to identify the supported way to control it. Done means the navigation scrollbar is absent while page scrolling remains controllable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100