Occurs when a new set of ink strokes and/or elements is being selected.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
'Declaration Public Event SelectionChanging As InkCanvasSelectionChangingEventHandler 'Usage Dim instance As InkCanvas Dim handler As InkCanvasSelectionChangingEventHandler AddHandler instance.SelectionChanging, handler
The event is raised when strokes and/or elements are selected by the user - but before the change is applied.
The event is processed when the InkCanvasSelectionChangingEventHandler receives an InkCanvasSelectionChangingEventArgs object. InkCanvasSelectionChangingEventArgs provides methods for accessing FrameworkElement and StrokeCollection objects after they are selected by the user.
After the change is applied, the SelectionChanged event is raised.
The event does not occur when the selected strokes are deleted or when the ActiveEditingMode property changes.
The following example makes selected strokes royal blue.
Private Sub inkCanvas1_SelectionChanging(ByVal sender As Object, _ ByVal e As InkCanvasSelectionChangingEventArgs) Dim selectedStrokes As StrokeCollection = e.GetSelectedStrokes() Dim aStroke As Stroke For Each aStroke In inkCanvas1.Strokes If selectedStrokes.Contains(aStroke) Then aStroke.DrawingAttributes.Color = Colors.RoyalBlue Else aStroke.DrawingAttributes.Color = inkCanvas1.DefaultDrawingAttributes.Color End If Next aStroke End Sub 'inkCanvas1_SelectionChanging
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.