Compartir a través de


InkOverlay.SelectionChanged Event

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

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)

Syntax

'Declaration
Public Event SelectionChanged As InkOverlaySelectionChangedEventHandler
'Usage
Dim instance As InkOverlay
Dim handler As InkOverlaySelectionChangedEventHandler

AddHandler instance.SelectionChanged, handler
public event InkOverlaySelectionChangedEventHandler SelectionChanged
public:
event InkOverlaySelectionChangedEventHandler^ SelectionChanged {
    void add (InkOverlaySelectionChangedEventHandler^ value);
    void remove (InkOverlaySelectionChangedEventHandler^ value);
}
/** @event */
public void add_SelectionChanged (InkOverlaySelectionChangedEventHandler value)

/** @event */
public void remove_SelectionChanged (InkOverlaySelectionChangedEventHandler value)
In JScript, you can handle the events defined by a class, but you cannot define your own.
Not applicable.

Remarks

The event handler receives an argument of type EventArgsEventArgs, which contains no data.

Example

This C# example displays the number of selected strokes of an InkOverlay object, theInkOverlay, in a status bar, 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.";
  }
//...

This Microsoft Visual Basic .NET example displays the number of selected strokes of an InkOverlay object, theInkOverlay, in a status bar, 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
'...

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkOverlay Class
InkOverlay Members
Microsoft.Ink Namespace
InkOverlay.Selection
InkOverlay.SelectionChanging