C# Class SilverFlow.Controls.Controllers.InertiaController

Calculates inertial motion of a dragged element.
Afficher le fichier Open project: Zoomicon/ZUI Class Usage Examples

Méthodes publiques

Méthode Description
GetInertialMotionParameters ( Rect hostBounds, Rect windowBounds ) : InertialMotion

Gets inertial motion parameters: distance and duration.

MoveToPoint ( Point point ) : void

Saves the last position of the moved element.

StartMotion ( Point point ) : void

An element starts its motion.

Private Methods

Méthode Description
EnsureEndPointInBounds ( Vector2 vector, Rect bounds ) : Vector2

Ensures the end point is in bounds.

Method Details

GetInertialMotionParameters() public méthode

Gets inertial motion parameters: distance and duration.
public GetInertialMotionParameters ( Rect hostBounds, Rect windowBounds ) : InertialMotion
hostBounds System.Windows.Rect The host bounds.
windowBounds System.Windows.Rect The window bounds.
Résultat InertialMotion

MoveToPoint() public méthode

Saves the last position of the moved element.
public MoveToPoint ( Point point ) : void
point Point Current position.
Résultat void

StartMotion() public méthode

An element starts its motion.
public StartMotion ( Point point ) : void
point Point The starting point of the motion.
Résultat void