Ok, here is my scrollbar style.
<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
<Setter Property="Background" Value="#D5E0FF" /开发者_开发问答>
</Style>
If I apply this, all scrollbars in my application will get affected, undoubtedly.
Now I have 2 listview(s) in my application, I need to apply this style to only a particular listview, while another one remain default scrollbar, any idea?
This is driving me crazy.
Thanks.
Add the style as a resource to the ListView itself.
<ListView>
<ListView.Resources>
<Style TargetType="ScrollBar">
...
</Style>
</ListView.Resources>
</ListView>
精彩评论