IncrementalHitTester.IsValid Właściwość

Definicja

Pobiera informacje o tym IncrementalHitTester , czy test trafiony.

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

Wartość właściwości

trueIncrementalHitTester jeśli test jest trafiony; w przeciwnym razie . false

Przykłady

W poniższym przykładzie pokazano, jak sprawdzić, czy IncrementalHitTester element jest prawidłowy przed dodaniem do niego punktów. W tym przykładzie założono, że istnieje IncrementalHitTester nazwa .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

Uwagi

Zwraca wartość IsValidtrue do EndHitTesting wywołania. Następnie zwraca wartość false.

Dotyczy