Vertical Scrollbar doesn't appear and Scrolling is disabled when WPF UI Style is applied (window-wide)
@pomianowski is already working on this.
Since Aug 3, 2022.
- Dominant language
- C#
- Stars
- 9.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Problem was described in this pull request:
https://github.com/lepoco/wpfui/pull/76
To Reproduce
Steps to reproduce the behavior:
- Create a Grid
- Put a TreeView into it
- use WPF UI Themes in Window.ResourceDictionary
- add more items to the screen than can fit into it
- run
Expected behavior
A vertical scrollbar should appear when content takes more space than TreeView got from its parent layout (e.g., Grid)
Screenshots
If applicable, add screenshots to help explain your problem.

As you can see here, vertical scrollbar doesn't exist.
Desktop (please complete the following information):
- OS: Windows 11 22H2 RP
- .NET: .NET 6.02 x64
- Version: 2.02 (latest)
Additional context
Add any other context about the problem here.
I've ultimately got style for TreeView from here:
https://docs.microsoft.com/en-us/dotnet/desktop/wpf/controls/treeview-styles-and-templates?view=netframeworkdesktop-4.8
This helped me to get what I've needed but I've found this solution only after analyzing control tree in running app and learned that VerticalScrollBar wasn't even enabled (even though I've specifically told the ScrollViewer of the TreeView to set visibility of Vertical Scroll Bar to Visible.
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.
Assessment
This issue has not been assessed yet.