Remove Scrollbar / Scrollviewer animation
Hi there !
I'm using a scrollviewer in a project with the default Noesis's style (from DarkBlue) , and I'm facing an issue, there is a default animation on the control which makes it invisible at first, showing a thin line when hovering rapidly, and then when hovering for more than 500ms shows the full scrollbar.
Is it possible to completely disable this behaviour, keeping just the final look of the scrollbar ?
Thanks !
I'm using a scrollviewer in a project with the default Noesis's style (from DarkBlue) , and I'm facing an issue, there is a default animation on the control which makes it invisible at first, showing a thin line when hovering rapidly, and then when hovering for more than 500ms shows the full scrollbar.
Is it possible to completely disable this behaviour, keeping just the final look of the scrollbar ?
Thanks !
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Remove Scrollbar / Scrollviewer animation
Hi, the ScrollBar style defined by our theme can be found here: https://github.com/Noesis/Managed/blob/ ... #L849-L971
You can create a local style for the ScrollBar in your application removing those animations and showing the buttons and bar by default.
You can create a local style for the ScrollBar in your application removing those animations and showing the buttons and bar by default.
Code: Select all
<Grid>
<Grid.Resources>
<ControlTemplate x:Key="MyHorizontalScrollBar">...</ControlTemplate>
<ControlTemplate x:Key="MyVerticalScrollBar">...</ControlTemplate>
<Style TargetType="ScrollBar">
<Style.Triggers>
<Trigger Property="Orientation" Value="Horizontal">
<Setter Property="Template" Value="{StaticResource MyHorizontalScrollBar}"/>
</Trigger>
<Trigger Property="Orientation" Value="Vertical">
<Setter Property="Template" Value="{StaticResource MyVerticalScrollBar}"/>
</Trigger>
</Style.Triggers>
</Style>
<Grid.Resources>
....
<Grid>
Who is online
Users browsing this forum: Google [Bot] and 77 guests