InkToolbar.EraseAllClicked Event

Definition

Occurs when "Erase All Ink" is selected from the flyout for the InkToolbarEraserButton on the InkToolbar.

// Register
event_token EraseAllClicked(TypedEventHandler<InkToolbar, IInspectable const&> const& handler) const;

// Revoke with event_token
void EraseAllClicked(event_token const* cookie) const;

// Revoke with event_revoker
InkToolbar::EraseAllClicked_revoker EraseAllClicked(auto_revoke_t, TypedEventHandler<InkToolbar, IInspectable const&> const& handler) const;
public event TypedEventHandler<InkToolbar,object> EraseAllClicked;
function onEraseAllClicked(eventArgs) { /* Your code */ }
inkToolbar.addEventListener("eraseallclicked", onEraseAllClicked);
inkToolbar.removeEventListener("eraseallclicked", onEraseAllClicked);
- or -
inkToolbar.oneraseallclicked = onEraseAllClicked;
Public Custom Event EraseAllClicked As TypedEventHandler(Of InkToolbar, Object) 

Event Type

Remarks

Each feature on the InkToolbar can support supplementary functionality in a flyout (an "extension glyph" on the feature button indicates to the user that the functionality is available). "Erase All Ink" is the built-in flyout for the Eraser button.

To access the functionality, the feature button must be selected already, and the user must select the button again.

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.

Applies to

See also