IncrementalHitTester.IsValid 属性

定义

获取命中测试是否 IncrementalHitTester

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

属性值

true 如果命中测试, IncrementalHitTester 则为 ;否则为 false

示例

以下示例演示如何在向其添加点之前检查 IncrementalHitTester 是否有效。 此示例假定有一个 IncrementalHitTester 调用 eraseTester

// Collect the StylusPackets as the stylus moves.
protected override void OnStylusMove(StylusEventArgs e)
{
    if (eraseTester.IsValid)
    {
        eraseTester.AddPoints(e.GetStylusPoints(this));
    }
}
' Collect the StylusPackets as the stylus moves.
Protected Overrides Sub OnStylusMove(ByVal e As StylusEventArgs)

    If eraseTester.IsValid Then
        eraseTester.AddPoints(e.GetStylusPoints(Me))
    End If

End Sub

注解

IsValid返回true直到EndHitTesting调用为止。 然后返回 false

适用于