InertiaProcessor2D.IsRunning Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets whether inertia is currently in progress.
public:
property bool IsRunning { bool get(); };
public bool IsRunning { get; }
member this.IsRunning : bool
Public ReadOnly Property IsRunning As Boolean
Property Value
A Boolean value indicating whether inertia is currently in progress.
Examples
In the following example, an event handler for the ManipulationProcessor2D.Started event checks to see if inertia processing is running and, if so, stops it by calling the Completed method.
#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
Applies to
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.