อ่านในภาษาอังกฤษ แก้ไข

แชร์ผ่าน


ManipulationProcessor2D.Started Event

Definition

Occurs when a new manipulation has started.

C#
public event EventHandler<System.Windows.Input.Manipulations.Manipulation2DStartedEventArgs> Started;

Event Type

Examples

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

C#
#region OnManipulationStarted
private void OnManipulationStarted(object sender, Manipulation2DStartedEventArgs e)
{
    if (inertiaProcessor.IsRunning)
    {
        inertiaProcessor.Complete(Timestamp);
    }
}
#endregion
C#
#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

Applies to

ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10