In This Article

InertiaScrollViewer Class

A control that provides scrolling with inertia on touch input.

public class InertiaScrollViewer : AbstractedInputContentControl
Inheritance:
object Visual UIElement FrameworkElement Control ContentControl AbstractedInputContentControl object

Constructors

InertiaScrollViewer()

Initializes an instance of the class.

public InertiaScrollViewer()

Properties

EasingFunction

The easing function.

public IEasingFunction EasingFunction { get; set; }

Property Value

IEasingFunction

HorizontalOffset

The horizontal offset.

public double HorizontalOffset { get; set; }

Property Value

double

HorizontalScrollBarVisibility

The horizontal scroll bar visibility.

public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }

Property Value

ScrollBarVisibility

VelocityDistanceRatio

The velocity / distance ratio.

public double VelocityDistanceRatio { get; set; }

Property Value

double

VelocityTimeRatio

The velocity / time ratio.

public double VelocityTimeRatio { get; set; }

Property Value

double

VerticalOffset

The vertical offset.

public double VerticalOffset { get; set; }

Property Value

double

VerticalScrollBarVisibility

The vertical scroll bar visibility.

public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }

Property Value

ScrollBarVisibility

Methods

GetHandleTouchEvents(DependencyObject)

Gets the HandleTouchEvents attached property for a given UIElement.

public static bool GetHandleTouchEvents(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object.

Returns

bool:

true if the target handles it's own touch events; otherwise, false.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

OnInputPreviewMouseWheel(object?, InputMouseWheelEventArgs)

Called when a MouseWheel tunnelling event occurs.

protected override void OnInputPreviewMouseWheel(object? sender, InputMouseWheelEventArgs args)
Parameter Type Description
sender object

The sender.

args InputMouseWheelEventArgs

The InputMouseWheelEventArgs instance containing the event data.

OnInputPreviewTouchDown(object?, InputTouchEventArgs)

Called when a TouchDown tunnelling event occurs.

protected override void OnInputPreviewTouchDown(object? sender, InputTouchEventArgs args)
Parameter Type Description
sender object

The sender.

args InputTouchEventArgs

The InputTouchEventArgs instance containing the event data.

OnInputPreviewTouchMove(object?, InputTouchEventArgs)

Called when a TouchMove tunnelling event occurs.

protected override void OnInputPreviewTouchMove(object? sender, InputTouchEventArgs args)
Parameter Type Description
sender object

The sender.

args InputTouchEventArgs

The InputTouchEventArgs instance containing the event data.

OnInputPreviewTouchUp(object?, InputTouchEventArgs)

Called when a TouchUp tunnelling event occurs.

protected override void OnInputPreviewTouchUp(object? sender, InputTouchEventArgs args)
Parameter Type Description
sender object

The sender.

args InputTouchEventArgs

The InputTouchEventArgs instance containing the event data.

OnInternalScrollViewerLoaded(object, RoutedEventArgs)

Called when internal scroll viewer is loaded.

public void OnInternalScrollViewerLoaded(object sender, RoutedEventArgs args)
Parameter Type Description
sender object

The sender.

args RoutedEventArgs

The event data.

ScrollToTop(TimeSpan)

Scrolls vertically to the beginning of the content.

public void ScrollToTop(TimeSpan duration)
Parameter Type Description
duration TimeSpan

SetHandleTouchEvents(DependencyObject, bool)

Sets the HandleTouchEvents attached property on a target UIElement.

public static void SetHandleTouchEvents(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The target.

value bool

If set to true, then the control will not scroll when touch events occur in it's bounds.

Fields

EasingFunctionProperty

Defines the EasingFunction property.

public static readonly DependencyProperty EasingFunctionProperty

HandleTouchEventsProperty

Defines the HandleTouchEvents attached property.

public static readonly DependencyProperty HandleTouchEventsProperty

HorizontalOffsetProperty

Defines the HorizontalOffset property.

public static readonly DependencyProperty HorizontalOffsetProperty

HorizontalScrollBarVisibilityProperty

Defines the HorizontalScrollBarVisibility property.

public static readonly DependencyProperty HorizontalScrollBarVisibilityProperty

VelocityDistanceRatioProperty

Defines the VelocityDistanceRatio property.

public static readonly DependencyProperty VelocityDistanceRatioProperty

VelocityTimeRatioProperty

Defines the VelocityTimeRatio property.

public static readonly DependencyProperty VelocityTimeRatioProperty

VerticalOffsetProperty

Defines the VerticalOffset property.

public static readonly DependencyProperty VerticalOffsetProperty

VerticalScrollBarVisibilityProperty

Defines the VerticalScrollBarVisibility property.

public static readonly DependencyProperty VerticalScrollBarVisibilityProperty

Inherited Members

Extension Methods