Class Scrollable
A Manipulator that allows the user to scroll a target element using your finger or mouse click and drag.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class Scrollable : Manipulator, IManipulator
Constructors
Scrollable(Action<Scrollable>, Action<Scrollable>, Action<Scrollable>, Action<Scrollable>)
Construct a Scrollable manipulator.
Declaration
public Scrollable(Action<Scrollable> dragHandler, Action<Scrollable> upHandler, Action<Scrollable> downHandler = null, Action<Scrollable> cancelHandler = null)
Parameters
Type | Name | Description |
---|---|---|
Action<Scrollable> | dragHandler | A callback invoked during dragging state. |
Action<Scrollable> | upHandler | A callback invoked when a PointerUpEvent has been received. |
Action<Scrollable> | downHandler | A callback invoked when a PointerDownEvent has been received. |
Action<Scrollable> | cancelHandler | A callback invoked when a PointerCancelEvent has been received. |
Properties
direction
The direction of the scroll.
Declaration
public ScrollViewMode direction { get; set; }
Property Value
Type | Description |
---|---|
ScrollViewMode |
threshold
The threshold to consider a drag operation. Default is 8f.
Declaration
public float threshold { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
Cancel()
Cancel the current drag operation.
Declaration
public void Cancel()
RegisterCallbacksOnTarget()
Called to register event callbacks on the target element.
Declaration
protected override void RegisterCallbacksOnTarget()
Overrides
UnregisterCallbacksFromTarget()
Called to unregister event callbacks from the target element.
Declaration
protected override void UnregisterCallbacksFromTarget()