The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
IncrementalStrokeHitTester.StrokeHit Event
.NET Framework (current version)
Occurs when the IncrementalStrokeHitTester intersects an ink Stroke.
Assembly: PresentationCore (in PresentationCore.dll)
The following example demonstrates how to dynamically erase a portion of a Stroke. To create a control that enables a user to erase ink, see How to: Erase Ink on a Custom Control.
// When the stylus intersects a stroke, erase that part of // the stroke. When the stylus dissects a stoke, the // Stroke.Erase method returns a StrokeCollection that contains // the two new strokes. void eraseTester_StrokeHit(object sender, StrokeHitEventArgs args) { StrokeCollection eraseResult = args.GetPointEraseResults(); StrokeCollection strokesToReplace = new StrokeCollection(); strokesToReplace.Add(args.HitStroke); // Replace the old stroke with the new one. if (eraseResult.Count > 0) { presenter.Strokes.Replace(strokesToReplace, eraseResult); } else { presenter.Strokes.Remove(strokesToReplace); } }
.NET Framework
Available since 3.0
Available since 3.0
Show: