The InertiaScrollViewer
-like control that reacts to touch and continues gliding to a stop when flicked.
Overview
The InertiaContentControl
that scrolls its content. Like a ScrollViewer
, it will display whatever UIElement
you set the Content
property to.
Note
When scrolling with a mouse wheel, vertical scrolling will always take priority. If vertical scrolling is not possible, Inertia
Scroll Bar Visibility
The direction of scrolling can be controlled using Inertia
ScrollBarVisibility.Auto
will show a scrollbar if theContent
size is larger than the size of the viewport.ScrollBarVisibility.Disabled
will not show a scrollbar, regardless of whether or notContent
fits in the viewport. Scrolling in this direction will be disabled.ScrollBarVisibility.Hidden
will not show a scrollbar, regardless of whether or notContent
fits in the viewport, however scrolling in this direction will still be possible.ScrollBarVisibility.Visible
will always show a scrollbar, regardless of whether or notContent
fits in the viewport. If content is larger than the viewport, scrolling will be possible.
Adjusting Inertia Scrolling
Inertia scrolling (how scrolling continues to glide after a flick gesture) can be adjusted using several properties.
Inertia
Scroll .EasingViewer Function is the easing function that determines the curve of the scrolling. It defaults toQuarticEase
but can be set to anySystem.Windows.Media.Animation.EasingFunctionBase
. There are several available in theSystem.Windows.Media.Animation
namespace, such asQuadraticEase
,BounceEase
, and more.Inertia
Scroll .VelocityViewer Distance is the ratio of distance to velocity that determines the distance travelled when scrolling. A smaller number means less travel when scrolling with inertia, while a larger number means more travel.Ratio Inertia
Scroll .VelocityViewer Time is the ratio of time to velocity that determines the duration of the scrolling animation. A smaller number means the scrolling animation will be faster, while a larger number means the animation will be slower.Ratio