You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an answer, not a question. I was frustrated by the default size of the scrollbar thumb being tiny when there is a large amount of content to scroll. It's way too small.
I found the following discussion: and the answer there works for the WPF UI case as well: MinHeight on ScrollBar Thumb?
In my copy of ScrollBar.xaml, I have added the Double value like below. I chose 52 which gives a minimum thumb size of 26 because that matches Word and Edge minimum thumb sizing.
<ControlTemplate x:Key="UiVerticalScrollBar" TargetType="{x:Type ScrollBar}">
. . .
<Track
x:Name="PART_Track"
Grid.Row="1"
Width="6"
IsDirectionReversed="True">
<Track.Resources>
<!-- Thumb's minimum height is half of this metric -->
<!-- Using 52 (26) to match Word and Edge. -->
<system:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">52</system:Double>
</Track.Resources>
<Track.DecreaseRepeatButton>
<RepeatButton Command="ScrollBar.PageUpCommand" Style="{StaticResource UiScrollBarPageButton}" />
</Track.DecreaseRepeatButton>
<Track.Thumb>
<Thumb
Margin="0"
Padding="0"
Style="{StaticResource UiScrollBarThumb}" />
</Track.Thumb>
<Track.IncreaseRepeatButton>
<RepeatButton Command="ScrollBar.PageDownCommand" Style="{StaticResource UiScrollBarPageButton}" />
</Track.IncreaseRepeatButton>
</Track>
Hope this helps others. It would be nice if this were configurable or even settable via an attached property but that's an exercise for the reader.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is an answer, not a question. I was frustrated by the default size of the scrollbar thumb being tiny when there is a large amount of content to scroll. It's way too small.
I found the following discussion: and the answer there works for the WPF UI case as well:
MinHeight on ScrollBar Thumb?
In my copy of ScrollBar.xaml, I have added the Double value like below. I chose 52 which gives a minimum thumb size of 26 because that matches Word and Edge minimum thumb sizing.
Hope this helps others. It would be nice if this were configurable or even settable via an attached property but that's an exercise for the reader.
Beta Was this translation helpful? Give feedback.
All reactions