This documentation is archived and is not being maintained.

InkCanvas.EraserShape Property

Gets or sets the StylusShape used to point-erase ink from an InkCanvas.

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

public StylusShape EraserShape { get; set; }
/** @property */
public StylusShape get_EraserShape ()

/** @property */
public void set_EraserShape (StylusShape value)

public function get EraserShape () : StylusShape

public function set EraserShape (value : StylusShape)

 This property is not typically used in XAML. 

Property Value

The eraser shape associated with the InkCanvas.

This shape will be used to erase ink from an InkCanvas when the current EditingMode is set to EraseByPoint.

Individual properties of a StylusShape cannot be modified once the shape has been created.

The cursor rendered on the InkCanvas is not updated when you change the EraserShape until the next EditingMode change.

The following example demonstrates how to allow a user to partially erase strokes with the inverted tip of a stylus. An elliptical cursor appears on the InkCanvas when the user erases ink.

inkCanvas1.EditingModeInverted = InkCanvasEditingMode.EraseByPoint;
inkCanvas1.EraserShape = new EllipseStylusShape(5, 5);

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0