InertiaProcessor2D.IsRunning Property
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
A Boolean value indicating whether inertia is currently in progress.
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
Product | 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 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: