StrokeErasing Event

InkCanvas.StrokeErasing Event


Occurs just before a user erases a stroke.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public event InkCanvasStrokeErasingEventHandler StrokeErasing

Handle this event when you want to check whether a stroke should be erased. Set the Cancel property to true if you want to prevent the stroke from being erased. You can use this technique when the EditingMode or EditingModeInverted property is set to EraseByStroke or EraseByPoint.

Legacy Code Example

The following example prevents any strokes rendered as highlighters from being erased. The example assumes that the InkCanvas is connected to the event handler.

Code snippet is not found. Confirm that the code snippet name 'DrawingAttributes' is correct.

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft