Freigeben über


ITextSelection.SelectionChanged Event

Occurs when Select or Clear are called, as well as when the selection is empty and the caret is moved. The sender of the event is this ITextSelection.

Namespace:  Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)

Syntax

'Declaration
Event SelectionChanged As EventHandler
event EventHandler SelectionChanged
 event EventHandler^ SelectionChanged {
    void add (EventHandler^ value);
    void remove (EventHandler^ value);
}
abstract SelectionChanged : IEvent<EventHandler,
    EventArgs>
JScript does not support events.

Remarks

This event is not raised if the selection shrinks or grows because its associated span shrinks or grows.

The location of an empty selection is the location of the caret.

.NET Framework Security

See Also

Reference

ITextSelection Interface

Microsoft.VisualStudio.Text.Editor Namespace