Skip to content

Commit

Permalink
Merge pull request #551 from Korjam/bugfix/550-tree-view-scroll
Browse files Browse the repository at this point in the history
Bugfix/550 tree view scroll
  • Loading branch information
pomianowski authored Mar 3, 2023
2 parents 90c52aa + 3bba186 commit 5ae2524
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Wpf.Ui/Styles/Controls/TreeView.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--
<!--
This Source Code Form is subject to the terms of the MIT License.
If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
Copyright (C) Leszek Pomianowski and WPF UI Contributors.
Expand Down Expand Up @@ -38,12 +38,21 @@
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4">
<ScrollViewer
CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
Name="ItemsPresenterScrollViewer"
CanContentScroll="False"
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
<ItemsPresenter Margin="{TemplateBinding Padding}" />
</ScrollViewer>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="VirtualizingPanel.IsVirtualizing" Value="True">
<Setter
TargetName="ItemsPresenterScrollViewer"
Property="CanContentScroll"
Value="True"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
Expand Down

0 comments on commit 5ae2524

Please sign in to comment.