다음을 통해 공유


InertiaProcessor2D.IsRunning 속성

정의

관성이 현재 진행 중인지 여부를 가져옵니다.

public:
 property bool IsRunning { bool get(); };
public bool IsRunning { get; }
member this.IsRunning : bool
Public ReadOnly Property IsRunning As Boolean

속성 값

관성이 현재 진행 중인지 여부를 나타내는 부울 값입니다.

예제

다음 예제에 대 한 이벤트 처리기를 ManipulationProcessor2D.Started 확인 경우 관성 처리 중인지와 그럴 경우 호출 하 여 중지 하는 이벤트를 Completed 메서드.

#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

적용 대상