Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ManipulationProcessor2D::Started Event

.NET Framework (current version)
 

Occurs when a new manipulation has started.

Namespace:   System.Windows.Input.Manipulations
Assembly:  System.Windows.Input.Manipulations (in System.Windows.Input.Manipulations.dll)

public:
event EventHandler<Manipulation2DStartedEventArgs^>^ Started {
	void add(EventHandler<Manipulation2DStartedEventArgs^>^ value);
	void remove(EventHandler<Manipulation2DStartedEventArgs^>^ value);
}

In the following example, an event handler for the Started event checks to see if inertia processing is running and if so, stops it.

#region OnManipulationStarted
private void OnManipulationStarted(object sender, Manipulation2DStartedEventArgs e)
{
    if (inertiaProcessor.IsRunning)
    {
        inertiaProcessor.Complete(Timestamp);
    }
}
#endregion
#region Timestamp
private long Timestamp
{
    get
    {
        // Get timestamp in 100-nanosecond units.
        double nanosecondsPerTick = 1000000000.0 / System.Diagnostics.Stopwatch.Frequency;
        return (long)(System.Diagnostics.Stopwatch.GetTimestamp() / nanosecondsPerTick / 100.0);
    }
}
#endregion

.NET Framework
Available since 4.0
Return to top
Show:
© 2017 Microsoft