I have a ListBox control with a vertical scrollbar. I would like to increase the Repeat Buttons' Height to something bigger because our UI is touch-compatible.
Is there a simple way to do it ?
Thank you 开发者_如何转开发and best regards,
Romanin
Easiest is to modify the ControlTemplate for a vertical scrollbar and change it to what you want: ScrollBar ControlTemplate Example
It's not so easy to just change the button sizes, because they are hardcoded in the default template. But you can scale the whole ScrollBar control by a factor. Just put this Style to your Window or Control resources.
<Window.Resources>
<Style TargetType="ScrollBar">
<Setter Property="LayoutTransform">
<Setter.Value>
<ScaleTransform CenterX="0" CenterY="0"
ScaleX="2" ScaleY="2" />
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
精彩评论