Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

IVsSelectionEvents Interface

Notifies registered VSPackages of changes to the current selection, element value, or command UI context.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

[GuidAttribute("82871589-D680-4D86-B969-9D1102B00F6F")]
[InterfaceTypeAttribute()]
public interface IVsSelectionEvents

To receive notifications, you must first register with the SVsShellMonitorSelection service by calling AdviseSelectionEvents. The pSink parameter to this method holds a pointer to your IVsSelectionEvents interface.

Each method in IVsSelectionEvents reports a different type of change. For example, when the current selection changes, your OnSelectionChanged method is called.

Notes to Implementers:

VSPackages implement IVsSelectionEvents to be able to track selection changes in the environment.

Community Additions

ADD
Show:
© 2015 Microsoft