Skip to content

Styling ScrollBar's Thumb in ScrollViewer #6782

Answered by maxkatz6
milkywayfarer asked this question in Q&A
Discussion options

You must be logged in to vote

Typical rule of thumb when some setter is no applied is following:

  • this property is either overridden after by another style
  • or this property has value of higher priority than style-priority (Local value and Animations are higher priority)
  • or you haven't defined styles for additional pseudoclasses (pointerover, pressed, disabled...).

I don't know which theme you are using (Default, Fluent or any other custom), but here are the sources for ScrollBar:
https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Default/ScrollBar.xaml
https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/ScrollBar.xaml

And with Avalonia DevTools (F12) you can see …

Replies: 1 comment 1 reply

Comment options

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

Answer selected by milkywayfarer
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