Page 1 of 1

ScrollBar on ListBox

Posted: 24 Jan 2021, 23:21
by mariorancic
I have 2 question regarding ScrollBar on ListBox,
1. When I set VirtualizingStackPanel.ScrollUnit="Pixel" and also i am using virtualization, then I scroll to bottom with just few items and only when i click on bottom arrow I can scroll more. WhenScrollUnit is Item then this works ok.

2. I override Thumb and ScrollBar templates but still scrollbar on Listbox are not changed. What should I do. I saw on forums manz people wer talking about NoesisStyle.xaml but how to get it.

I actually test all of this on Ubuntu on WSL2 on X410 Server and everzthing works the same like on Windows.

Re: ScrollBar on ListBox

Posted: 25 Jan 2021, 12:14
by sfernandez
1. How are you scrolling the list, using mouse wheel?

2. Are you using our theme styles? If not, how is ScrollViewer template defined?
In our theme, the ScrollViewer template uses the ScrollBar without explicitly specifying a template or style, so it will rely on typed style resources to find the style it will use for the ScrollBar. You probably need to define a typed style too:
<ControlTemplate x:Key="MyScrollBarTemplate" TargetType="ScrollBar">...</ControlTemplate>
<Style TargetType="ScrollBar" BasedOn="{StaticResource {x:Type ScrollBar}}">
  <Setter Property="Template" Value="{StaticResource MyScrollBarTemplate}"/>