InkCanvas.DefaultDrawingAttributesReplaced Event

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Occurs when the DefaultDrawingAttributes property is replaced.

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

public event DrawingAttributesReplacedEventHandler DefaultDrawingAttributesReplaced

The following example checks the value of the IsHighlighter property of the new DrawingAttributes object.

void inkCanvas1_DefaultDrawingAttributesReplaced(object sender, DrawingAttributesReplacedEventArgs e)
{
    if (e.NewDrawingAttributes.IsHighlighter)
    {
        this.Title = "Now using a highlighter.";
    }
    else
    {
        this.Title = "Now using a pen.";
    }
}

.NET Framework
Available since 3.0
Return to top
Show: