Compartir a través de


InkOverlay.EraserMode Property

InkOverlay.EraserMode Property

Gets or sets a value that indicates whether ink is erased by stroke or by point.

Definition

Visual Basic .NET Public Property EraserMode As InkOverlayEraserMode
C# public InkOverlayEraserMode EraserMode { get; set; }
Managed C++ public: __property InkOverlayEraserMode* get_EraserMode();
public: __property void set_EraserMode(InkOverlayEraserMode*);

Property Value

Microsoft.Ink.InkOverlayEraserMode. a value that indicates whether ink is erased by stroke or by point.

This property is read/write. This property has no default value.

StrokeErase0 Specifies ink is erased by a stroke.
PointErase1 Specifies ink is erased by a point.

Exceptions

COMException Leave Site:
ObjectDisposedException Leave Site:

Remarks

This property applies only when the EditingMode property is set to Delete.

When erasing in PointErase mode, strokes are often split into multiple smaller strokes.

Examples

[C#]

This C# example shows functions that are called when a user clicks menu items in order to change the eraser mode of an InkOverlay object, theInkOverlay.

private void menuItemStroke_Click(object sender, System.EventArgs e)
{
    theInkOverlay.EraserMode = InkOverlayEraserMode.StrokeErase;
    menuItemStroke.Checked = true;
    menuItemPoint.Checked = false;
}

private void menuItemPoint_Click(object sender, System.EventArgs e)
{
    theInkOverlay.EraserMode = InkOverlayEraserMode.PointErase;
    menuItemStroke.Checked = false;
    menuItemPoint.Checked = true;
}
            

[VB.NET]

This Microsoft® Visual Basic® .NET example shows functions that are called when a user clicks menu items in order to change the eraser mode of an InkOverlay object, theInkOverlay.

Imports Microsoft.Ink
'...
Private Sub MenuItemEraseStrokes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MenuItemStroke.Click
    theInkOverlay.EraserMode = InkOverlayEraserMode.StrokeErase
    MenuItemStroke.Checked = True
    MenuItemPoint.Checked = False
End Sub

Private Sub MenuItemPoint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MenuItemPoint.Click
    theInkOverlay.EraserMode = InkOverlayEraserMode.PointErase
    MenuItemStroke.Checked = False
    MenuItemPoint.Checked = True
End Sub
        

See Also