-api-id | -api-type |
---|---|
T:Windows.UI.Xaml.Controls.InkToolbarEraserButton |
winrt class |
Represents an InkToolbar button that activates the built-in eraser tool.
The InkToolbar consists of two distinct groups of button types:
-
One group of "tool" buttons containing the built-in drawing (InkToolbarBallpointPenButton, InkToolbarPencilButton), erasing (InkToolbarEraserButton), and highlighting (InkToolbarHighlighterButton) buttons. Custom tools (InkToolbarCustomPenButton and InkToolbarCustomToolButton) are added here.
Feature selection is mutually exclusive.
-
A second group of "toggle" buttons containing the built-in stencil (InkToolbarStencilButton) button (or the InkToolbarRulerButton button). Custom toggles (InkToolbarCustomToggleButton) are added here.
Features are not mutually exclusive and can be used concurrently with other active tools.
The eraser stroke has a default size of 2x2 pixels.
An ink stroke touched by the eraser stroke is deleted in its entirety, not just the portion under the erase stroke.
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.
Windows version | SDK version | Value added |
---|---|---|
1703 | 15063 | IsClearAllVisible |
Pen and stylus interactions, Add an InkToolbar to a Universal Windows Platform (UWP) app, Get Started Tutorial: Support ink in your UWP app, Ink sample (JavaScript), Get Started Tutorial: Support ink in your UWP app, Coloring book sample, Family notes sample