C# Class SilverFlow.Controls.Controllers.InertiaController

Calculates inertial motion of a dragged element.
Mostra file Open project: Zoomicon/ZUI Class Usage Examples

Public Methods

Method 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

Method Description
EnsureEndPointInBounds ( Vector2 vector, Rect bounds ) : Vector2

Ensures the end point is in bounds.

Method Details

GetInertialMotionParameters() public method

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.
return InertialMotion

MoveToPoint() public method

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

StartMotion() public method

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