- mariorancic
- Posts: 23
- Joined:
ScrollBar on ListBox
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.
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.
-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: ScrollBar on ListBox
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:
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:
Code: Select all
<ControlTemplate x:Key="MyScrollBarTemplate" TargetType="ScrollBar">...</ControlTemplate>
<Style TargetType="ScrollBar" BasedOn="{StaticResource {x:Type ScrollBar}}">
<Setter Property="Template" Value="{StaticResource MyScrollBarTemplate}"/>
...
</Style>
Who is online
Users browsing this forum: Ahrefs [Bot] and 20 guests