Page 1 of 1

Remove Scrollbar / Scrollviewer animation

Posted: 27 Jul 2021, 14:52
by z0rg77
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 !

Re: Remove Scrollbar / Scrollviewer animation

Posted: 02 Aug 2021, 13:15
by sfernandez
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.
<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>