Class PanGesture
Definition
- Namespace:
- Tizen.NUI
- Assembly:
- Tizen.NUI.dll
- API Level:
- 3
A PanGesture is emitted when the user moves one or more fingers in a particular direction.
A pan gesture will end in the following ways:
- User releases the primary finger (the first touch).
- User has more fingers on the screen than the maximum specified.
- User has less fingers on the screen than the minimum specified.
- Cancelled by the system.
A pan gesture will continue to be sent to the actor under than initial pan until it ends.
public class PanGesture : Gesture, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable
- Inheritance
- Implements
Constructors
View SourcePanGesture()
The default constructor.
Declaration
public PanGesture()
API Level: 3
Properties
View SourceDisplacement
This is a Vector2 showing how much the user has panned (dragged) since the last pan gesture or,
if the gesture has just started, then the amount panned since the user touched the screen.
A positive x value shows that the user is panning to the right, a negative x value means the opposite.
A positive y value shows that the user is panning downwards, a negative y value means upwards.
Declaration
public Vector2 Displacement { get; }
Property Value
Type | Description |
---|---|
Vector2 |
API Level: 3
View SourceNumberOfTouches
The total number of fingers touching the screen in a pan gesture.
Declaration
public uint NumberOfTouches { get; }
Property Value
Type | Description |
---|---|
UInt32 |
API Level: 3
View SourcePosition
The current touch position of the primary touch point in local actor coordinates.
Declaration
public Vector2 Position { get; }
Property Value
Type | Description |
---|---|
Vector2 |
API Level: 3
View SourceScreenDisplacement
This is a Vector2 showing how much the user has panned (dragged) since the last pan gesture or,
if the gesture has just started, then the amount panned since the user touched the screen.
A positive x value shows that the user is panning to the right, a negative x value means the opposite.
A positive y value shows that the user is panning downwards, a negative y value means upwards.
This value is in screen coordinates.
Declaration
public Vector2 ScreenDisplacement { get; }
Property Value
Type | Description |
---|---|
Vector2 |
API Level: 3
View SourceScreenPosition
The current touch position of the primary touch point in screen coordinates.
Declaration
public Vector2 ScreenPosition { get; }
Property Value
Type | Description |
---|---|
Vector2 |
API Level: 3
View SourceScreenVelocity
The velocity at which the user is moving their fingers.
This is represented as a Vector2 and is the pixel movement per millisecond.
A positive x value shows that the user is panning to the right, a negative x value means the opposite.
A positive y value shows that the user is panning downwards, a negative y values means upwards.
This value represents the screen coordinates.
Declaration
public Vector2 ScreenVelocity { get; }
Property Value
Type | Description |
---|---|
Vector2 |
API Level: 3
View SourceVelocity
The velocity at which the user is moving their fingers.
This is represented as a Vector2 and is the pixel movement per millisecond.
A positive x value shows that the user is panning to the right, a negative x value means the opposite.
A positive y value shows that the user is panning downwards, a negative y values means upwards.
Declaration
public Vector2 Velocity { get; }
Property Value
Type | Description |
---|---|
Vector2 |
API Level: 3
Methods
View SourceGetDistance()
Returns the distance the user has panned (dragged) since the last pan gesture or,
if the gesture has just started, then the distance moved since the user touched the screen.
This is always a positive value.
Declaration
public float GetDistance()
Returns
Type | Description |
---|---|
Single | The distance, as a float, a user's finger has panned. |
API Level: 3
View SourceGetScreenDistance()
Returns the distance the user has panned (dragged) since the last pan gesture in screen
coordinates or, if the gesture has just started, then the distance in screen coordinates moved
since the user touched the screen.
This is always a positive value.
Declaration
public float GetScreenDistance()
Returns
Type | Description |
---|---|
Single | The distance, as a float, a user's finger has panned. |
API Level: 3
View SourceGetScreenSpeed()
Returns the speed at which the user is moving their fingers relative to screen coordinates.
This is the pixel movement per millisecond.
Declaration
public float GetScreenSpeed()
Returns
Type | Description |
---|---|
Single | The speed of the pan (in pixels per millisecond). |
API Level: 3
View SourceGetSpeed()
Returns the speed at which the user is moving their fingers.
This is the pixel movement per millisecond.
Declaration
public float GetSpeed()
Returns
Type | Description |
---|---|
Single | The speed of the pan (in pixels per millisecond). |