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.
HorizontalOffset
The horizontal offset.
HorizontalScrollBarVisibility
The horizontal scroll bar visibility.
public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }
Property Value
VelocityDistanceRatio
The velocity / distance ratio.
VelocityTimeRatio
The velocity / time ratio.
VerticalOffset
The vertical offset.
VerticalScrollBarVisibility
The vertical scroll bar visibility.
public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }
Property Value
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:
trueif 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 |
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
- AbstractedInputContentControl.CaptureMouse(IInputElement)
- AbstractedInputContentControl.OnPreviewMouseWheel(MouseWheelEventArgs)
- AbstractedInputContentControl.OnPreviewTouchDown(TouchEventArgs)
- AbstractedInputContentControl.OnPreviewTouchMove(TouchEventArgs)
- AbstractedInputContentControl.OnPreviewTouchUp(TouchEventArgs)
- AbstractedInputContentControl.OnInputTouchFrameReported(object, InputSourceEventArgs)