Compartilhar via


InkPicture.SelectionChanged Event

InkPicture.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 InkPicture named theInkPicture in a status bar called inkStatusBar.

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

[Visual Basic .NET]

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

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

See Also