InertiaProcessor2D.IsRunning Propriété

Définition

Obtient une valeur indiquant si l'inertie est actuellement en cours.

C#
public bool IsRunning { get; }

Valeur de propriété

Valeur booléenne indiquant si l'inertie est actuellement en cours.

Exemples

Dans l’exemple suivant, un gestionnaire d’événements pour l’événement vérifie si le traitement de l’inertie ManipulationProcessor2D.Started est en cours d’exécution et, le cas échéant, l’arrête en appelant la Completed méthode .

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

S’applique à

Produit Versions
.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