InkPresenter.StrokesErased InkPresenter.StrokesErased InkPresenter.StrokesErased InkPresenter.StrokesErased InkPresenter.StrokesErased Event

Definition

Occurs when an InkStroke object is removed from an InkCanvas control using the pen eraser or the pen tip when Mode is set to Erasing.

public : event TypedEventHandler<InkPresenter, InkStrokesErasedEventArgs> StrokesErased
// Register
event_token StrokesErased(TypedEventHandler<InkPresenter, InkStrokesErasedEventArgs> const& handler) const;

// Revoke with event_token
void StrokesErased(event_token const& cookie) const;

// Revoke with event_revoker
StrokesErased_revoker StrokesErased(auto_revoke_t, TypedEventHandler<InkPresenter, InkStrokesErasedEventArgs> const& handler) const;
public event TypedEventHandler<InkPresenter, InkStrokesErasedEventArgs> StrokesErased
Public Event StrokesErased As TypedEventHandler (Of InkPresenter, InkStrokesErasedEventArgs)
function onStrokesErased(eventArgs){/* Your code */}


inkPresenter.addEventListener("strokeserased", onStrokesErased);
inkPresenter.removeEventListener("strokeserased", onStrokesErased);

Remarks

InkStrokeContainer.DeleteSelected does not cause this event to fire.

This event is not raised in custom dry mode (ActivateCustomDrying ).

Custom drying and the InkToolbar By default, ink input is processed on a low-latency background thread and rendered "wet" as it is drawn. When the stroke is completed (pen or finger lifted, or mouse button released), the stroke is processed on the UI thread and rendered "dry" to the InkCanvas layer (above the application content and replacing the wet ink). The ink platform enables you to override this behavior and completely customize the inking experience by custom drying the ink input.

If your app overrides the default ink rendering behavior of the InkPresenter with a custom drying implementation, the rendered ink strokes are no longer available to the InkToolbar and the built-in erase commands of the InkToolbar do not work as expected. To provide erase functionality, you must handle all pointer events, perform hit-testing on each stroke, and override the built-in "Erase all ink" command.

For more info on custom drying, see Pen interactions and Windows Ink in UWP apps.

See also