InkCanvas.DefaultDrawingAttributesReplaced Event


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

Occurs when the DefaultDrawingAttributes property is replaced.

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

Public Event DefaultDrawingAttributesReplaced As DrawingAttributesReplacedEventHandler

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

Private Sub inkCanvas1_DefaultDrawingAttributesReplaced(ByVal sender As Object, _
                            ByVal e As DrawingAttributesReplacedEventArgs)

    If (e.NewDrawingAttributes.IsHighlighter) Then

        Me.Title = "Now using a highlighter."


        Me.Title = "Now using a pen."

    End If

End Sub

.NET Framework
Available since 3.0
Return to top