Share via


InkOverlay.SelectionChanged Event

InkOverlay.SelectionChanged Event

Occurs when the selection of ink within the control has changed, such as through alterations to the user interface, cut-and-paste procedures, or the Selection property.

Definition

Visual Basic .NET Public Event SelectionChanged As InkOverlaySelectionChangedEventHandler
C# public event InkOverlaySelectionChangedEventHandler SelectionChanged;
Managed C++ public: __event InkOverlaySelectionChangedEventHandler SelectionChanged;

Remarks

The event handler receives an argument of type EventArgs Leave Site, which contains no data.

Examples

[C#]

This C# example displays the number of selected strokes of an InkOverlay named theInkOverlay in a status bar called inkStatusBar.

using Microsoft.Ink;
//...
  theInkOverlay.SelectionChanged += new InkOverlaySelectionChangedEventHandler(theInkOverlay_SelectionChanged);
//...
  private void theInkOverlay_SelectionChanged(object sender, System.EventArgs e)
  {
      inkStatusBar.Text = theInkOverlay.Selection.Count.ToString() + " strokes selected.";
  }
//...

[Visual Basic .NET]

This Microsoft® Visual Basic® .NET example displays the number of selected strokes of an InkOverlay named theInkOverlay in a status bar called InkStatusBar.

Imports Microsoft.Ink
'...
    Private WithEvents theInkOverlay As InkOverlay
'...
    Private Sub theInkOverlay_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) _
    Handles theInkOverlay.SelectionChanged
        InkStatusBar.Text = theInkOverlay.Selection.Count.ToString() + " strokes selected."
    End Sub
'...

See Also