IncrementalHitTester.IsValid Property

Definition

Gets whether the IncrementalHitTester is hit testing.

C#
public bool IsValid { get; }

Property Value

true if the IncrementalHitTester is hit testing; otherwise, false.

Examples

The following example demonstrates how to check whether the IncrementalHitTester is valid before adding points to it. This example assumes that there is an IncrementalHitTester called eraseTester.

C#
// Collect the StylusPackets as the stylus moves.
protected override void OnStylusMove(StylusEventArgs e)
{
    if (eraseTester.IsValid)
    {
        eraseTester.AddPoints(e.GetStylusPoints(this));
    }
}

Remarks

The IsValid returns true until EndHitTesting is called. Then it returns false.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 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, 10