Breyta

Deila með


ManipulationInertiaStartingEventArgs Class

Definition

Provides data for the ManipulationInertiaStarting event.

public ref class ManipulationInertiaStartingEventArgs sealed : System::Windows::Input::InputEventArgs
public sealed class ManipulationInertiaStartingEventArgs : System.Windows.Input.InputEventArgs
type ManipulationInertiaStartingEventArgs = class
    inherit InputEventArgs
Public NotInheritable Class ManipulationInertiaStartingEventArgs
Inherits InputEventArgs
Inheritance
ManipulationInertiaStartingEventArgs

Examples

The following example shows the ManipulationInertiaStarting event handler and sets the desired deceleration for translation, expansion, and rotation that is used during inertia. This example is part of a larger example in Walkthrough: Creating Your First Touch Application.

void Window_InertiaStarting(object sender, ManipulationInertiaStartingEventArgs e)
{

    // Decrease the velocity of the Rectangle's movement by 
    // 10 inches per second every second.
    // (10 inches * 96 pixels per inch / 1000ms^2)
    e.TranslationBehavior.DesiredDeceleration = 10.0 * 96.0 / (1000.0 * 1000.0);

    // Decrease the velocity of the Rectangle's resizing by 
    // 0.1 inches per second every second.
    // (0.1 inches * 96 pixels per inch / (1000ms^2)
    e.ExpansionBehavior.DesiredDeceleration = 0.1 * 96 / (1000.0 * 1000.0);

    // Decrease the velocity of the Rectangle's rotation rate by 
    // 2 rotations per second every second.
    // (2 * 360 degrees / (1000ms^2)
    e.RotationBehavior.DesiredDeceleration = 720 / (1000.0 * 1000.0);

    e.Handled = true;
}
Private Sub Window_InertiaStarting(ByVal sender As Object,
                                   ByVal e As ManipulationInertiaStartingEventArgs)

    ' Decrease the velocity of the Rectangle's movement by 
    ' 10 inches per second every second.
    ' (10 inches * 96 pixels per inch / 1000ms^2)
    e.TranslationBehavior.DesiredDeceleration = 10.0 * 96.0 / (1000.0 * 1000.0)

    ' Decrease the velocity of the Rectangle's resizing by 
    ' 0.1 inches per second every second.
    ' (0.1 inches * 96 pixels per inch / (1000ms^2)
    e.ExpansionBehavior.DesiredDeceleration = 0.1 * 96 / (1000.0 * 1000.0)

    ' Decrease the velocity of the Rectangle's rotation rate by 
    ' 2 rotations per second every second.
    ' (2 * 360 degrees / (1000ms^2)
    e.RotationBehavior.DesiredDeceleration = 720 / (1000.0 * 1000.0)

    e.Handled = True
End Sub

Remarks

You can use the ManipulationInertiaStartingEventArgs object to specify the inertial behavior of a manipulation. You can specify the inertial behavior for each type of manipulation separately by using the TranslationBehavior, ExpansionBehavior, and RotationBehavior properties. Each property is a type of object that represents the inertial behavior and in each case, you can specify the following:

  • The initial velocity of the inertia when it begins.

  • The desired position of the manipulation when inertia ends.

  • The desired deceleration of the inertia.

You typically specify either the desired position of the manipulation when inertia ends or the desired deceleration of the inertia, but not both.

For more information about manipulations, see the Input Overview.

Properties

Device

Gets the input device that initiated this event.

(Inherited from InputEventArgs)
ExpansionBehavior

Get or sets the rate of slowdown of expansion inertial movement.

Handled

Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.

(Inherited from RoutedEventArgs)
InitialVelocities

Gets the rates of changes to the manipulation that occur before inertia starts.

ManipulationContainer

Gets the container that the ManipulationOrigin property is relative to.

ManipulationOrigin

Gets or sets the point from which the manipulation originated.

Manipulators

Gets a collection of objects that represents the touch contacts for the manipulation.

OriginalSource

Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.

(Inherited from RoutedEventArgs)
RotationBehavior

Gets or sets the rate of slowdown of rotational inertial movement.

RoutedEvent

Gets or sets the RoutedEvent associated with this RoutedEventArgs instance.

(Inherited from RoutedEventArgs)
Source

Gets or sets a reference to the object that raised the event.

(Inherited from RoutedEventArgs)
Timestamp

Gets the time when this event occurred.

(Inherited from InputEventArgs)
TranslationBehavior

Gets or sets the rate of slowdown of linear inertial movement.

Methods

Cancel()

Cancels the manipulation.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
InvokeEventHandler(Delegate, Object)

Invokes event handlers in a type-specific way, which can increase event system efficiency.

(Inherited from InputEventArgs)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
OnSetSource(Object)

When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes.

(Inherited from RoutedEventArgs)
SetInertiaParameter(InertiaParameters2D)

Specifies the behavior of a manipulation during inertia.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to