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 a new instance of the InertiaScrollViewer class.

public InertiaScrollViewer()

Properties

EasingFunction

Gets or sets the easing function.

public IEasingFunction EasingFunction { get; set; }

Property Value

IEasingFunction:

The easing function.

HorizontalOffset

Gets or sets the horizontal offset.

public double HorizontalOffset { get; set; }

Property Value

double:

The horizontal offset.

HorizontalScrollBarVisibility

Gets or sets the horizontal scroll bar visibility.

public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }

Property Value

ScrollBarVisibility:

The horizontal scroll bar visibility.

VelocityDistanceRatio

Gets or sets the velocity / distance ratio.

public double VelocityDistanceRatio { get; set; }

Property Value

double:

The velocity / distance ratio.

VelocityTimeRatio

Gets or sets the velocity / time ratio.

public double VelocityTimeRatio { get; set; }

Property Value

double:

The velocity / time ratio.

VerticalOffset

Gets or sets the vertical offset.

public double VerticalOffset { get; set; }

Property Value

double:

The vertical offset.

VerticalScrollBarVisibility

Gets or sets the vertical scroll bar visibility.

public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }

Property Value

ScrollBarVisibility:

The vertical scroll bar visibility.

Methods

GetHandleTouchEvents(DependencyObject)

Gets the HandleTouchEventsProperty attached property for a given UIElement.

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

The target.

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 (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.

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 RoutedEventArgs instance containing 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 HandleTouchEventsProperty attached property on a target UIElement.

public static void SetHandleTouchEvents(DependencyObject target, bool value)
Parameter Type Description
target 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

Identifies the EasingFunction dependency property key. This field is read-only.

public static readonly DependencyProperty EasingFunctionProperty

HandleTouchEventsProperty

Identifies the HandleTouchEventsProperty attached dependency property key. This field is read-only.

public static readonly DependencyProperty HandleTouchEventsProperty

HorizontalOffsetProperty

Identifies the HorizontalOffset dependency property key. This field is read-only.

public static readonly DependencyProperty HorizontalOffsetProperty

HorizontalScrollBarVisibilityProperty

Identifies the HorizontalScrollBarVisibility dependency property key. This field is read-only.

public static readonly DependencyProperty HorizontalScrollBarVisibilityProperty

VelocityDistanceRatioProperty

Identifies the VelocityDistanceRatio dependency property key. This field is read-only.

public static readonly DependencyProperty VelocityDistanceRatioProperty

VelocityTimeRatioProperty

Identifies the VelocityTimeRatio dependency property key. This field is read-only.

public static readonly DependencyProperty VelocityTimeRatioProperty

VerticalOffsetProperty

Identifies the VerticalOffset dependency property key. This field is read-only.

public static readonly DependencyProperty VerticalOffsetProperty

VerticalScrollBarVisibilityProperty

Identifies the VerticalScrollBarVisibility dependency property key. This field is read-only.

public static readonly DependencyProperty VerticalScrollBarVisibilityProperty

Inherited Members