IVsSelectionEvents 接口

定义

通知注册的 Vspackage 当前选择、元素值或命令 UI 上下文的更改。

public interface class IVsSelectionEvents
public interface class IVsSelectionEvents
__interface IVsSelectionEvents
[System.Runtime.InteropServices.Guid("82871589-D680-4D86-B969-9D1102B00F6F")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsSelectionEvents
[<System.Runtime.InteropServices.Guid("82871589-D680-4D86-B969-9D1102B00F6F")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsSelectionEvents = interface
Public Interface IVsSelectionEvents
属性

注解

若要接收通知,必须先 SVsShellMonitorSelection 通过调用向服务注册 AdviseSelectionEventspSink此方法的参数包含指向接口的指针 IVsSelectionEvents

中的每种方法都 IVsSelectionEvents 报告不同类型的更改。 例如,当当前选定内容更改时,将 OnSelectionChanged 调用方法。

实施者说明

Vspackage 实现 IVsSelectionEvents ,以便能够跟踪环境中的选定内容。

方法

OnCmdUIContextChanged(UInt32, Int32)

报告命令 UI 上下文已更改。

OnElementValueChanged(UInt32, Object, Object)

报告元素值已更改。

OnSelectionChanged(IVsHierarchy, UInt32, IVsMultiItemSelect, ISelectionContainer, IVsHierarchy, UInt32, IVsMultiItemSelect, ISelectionContainer)

报告项目层次结构、项和/或选择容器已更改。

适用于