Stroke.GetEraseResult Method (Rect)

Returns segments of the current Stroke that are outside the specified rectangle.

Namespace:  System.Windows.Ink
Assembly:  PresentationCore (in PresentationCore.dll)

public StrokeCollection GetEraseResult(
	Rect bounds


Type: System.Windows.Rect

A Rect that specifies the area to erase.

Return Value

Type: System.Windows.Ink.StrokeCollection
A StrokeCollection that contains the segments of the current Stroke that are outside the bounds of the specified Rect.

The GetEraseResult method returns a StrokeCollection that contains strokes that represent the segments of the Stroke that are outside of bounds. GetEraseResult does not change the original Stroke.

The following example removes the ink that is within the specified bounds.

Rect myRect = new Rect(100, 100, 100, 100);

StrokeCollection eraseResults = aStroke.GetEraseResult(myRect);

// inkCanvas1 is the InkCanvas on which we update the strokes

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft