Reputation: 992
I am working on a WPF project. I need to customize the horizontal scrollbar of Listview,like reducing its height,changing background etc. How do I achieve this?
Using this, doesn't seem to have any effect:
<ListView>
<ListView.Resources>
<Style TargetType="ScrollBar">
<Setter Property="Height" Value="10"/>
</Style>
</ListView.Resources>
</ListView>
Upvotes: 4
Views: 18461
Reputation: 5769
If you want to modify the width and height of the bars, you can take a look at this question, which points you in the direction of using System.Windows.SystemParameters
to modify those values.
However I think you require more complex styling (e.g. change the background) so I'm afraid you will need to play with control template parts. Check these two links (found in the answer to this question):
Upvotes: 6