0

how is it possible to create a smooth scrolling ScrollViewer in WPF?

Actually, when Scrolling with my Mouse a little downwards, it jumps for some pixels. But i want it to smoothly scroll down. My code looks like this:

<ScrollViewer Grid.Column="1" >
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"/>
                <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="60"/>
            </Grid.ColumnDefinitions>
            <StackPanel x:Name="spTasks" Grid.Column="1" >
                <StackPanel.Resources>
                    <Style TargetType="{x:Type local:SmartTaskOverview2}" BasedOn="{StaticResource {x:Type UserControl}}">
                        <Setter Property="Margin" Value="10,0,0,20" />
                    </Style>
                </StackPanel.Resources>
            </StackPanel>
        </Grid>
    </ScrollViewer>

Hopefully someone can help me.

swiftBoy
  • 35,607
  • 26
  • 136
  • 135
DirtyNative
  • 2,553
  • 2
  • 33
  • 58

0 Answers0