Class PanGesture
Definition
- Assembly:
- Tizen.NUI.dll
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, IDisposable
- Inheritance
- Implements
-
System.ComponentModel.INotifyPropertyChangedSystem.IDisposable
Constructors
View SourcePanGesture()
The default constructor.
Declaration
public PanGesture()
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 |
NumberOfTouches
The total number of fingers touching the screen in a pan gesture.
Declaration
public uint NumberOfTouches { get; }
Property Value
Type | Description |
---|---|
uint |
Position
The current touch position of the primary touch point in local actor coordinates.
Declaration
public Vector2 Position { get; }
Property Value
Type | Description |
---|---|
Vector2 |
ScreenDisplacement
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 |
ScreenPosition
The current touch position of the primary touch point in screen coordinates.
Declaration
public Vector2 ScreenPosition { get; }
Property Value
Type | Description |
---|---|
Vector2 |
ScreenVelocity
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 |
Velocity
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 |
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 |
---|---|
float | The distance, as a float, a user's finger has panned. |
GetScreenDistance()
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 |
---|---|
float | The distance, as a float, a user's finger has panned. |
GetScreenSpeed()
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 |
---|---|
float | The speed of the pan (in pixels per millisecond). |
GetSpeed()
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 |
---|---|
float | The speed of the pan (in pixels per millisecond). |