Skip to content

How to change style of scrollbar in listbox or listview in WPF? #7800

Answered by miloush
VahidEra asked this question in Q&A
Discussion options

You must be logged in to vote
    <ListBox.Resources>
        <Style TargetType="ScrollBar" BasedOn="{StaticResource ScrollBarBaseStyle}" />
    </ListBox.Resources>

should do the trick since neither of the themes explicitly sets style on scrollbars. It will affect all scrollbars inside the ListBox though. If you don't want that, you will have to override the control template.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@VahidEra
Comment options

Answer selected by VahidEra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants