Wrap the StackPanel in a different panel
WPF ScrollViewer tries to scroll all the elements in the view at the same time, so you see the dynamic scroll behavior. Nested by a StackPanel in another panel, ScrollViewer will try to scroll the entire StackPanel in a view that is too large, so it will use smooth scrolling.
Example: Removing a DockPanel will give you scroll scrolling, but with it you will get smooth scroll behavior
<ScrollViewer VerticalScrollBarVisibility="Auto" CanContentScroll="True" Height="250"> <DockPanel> <StackPanel Name="basePanel" Orientation="Vertical" Width="200"> <Rectangle Height="75" Fill="Red" Width="200" /> <Rectangle Height="50" Fill="Orange" Width="200" /> <Rectangle Height="75" Fill="Yellow" Width="200" /> <Rectangle Height="75" Fill="Green" Width="200" /> <Rectangle Height="75" Fill="Black" Width="200" /> <Rectangle Height="75" Fill="Purple" Width="200" /> </StackPanel> </DockPanel> </ScrollViewer>
source share