IMonitorSelectionService 接口

监视 shell 中当前的选定状态。

此 API 不兼容 CLS。 

命名空间:  Microsoft.VisualStudio.Modeling.Shell
程序集:  Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0(在 Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0.dll 中)

语法

声明
<CLSCompliantAttribute(False)> _
Public Interface IMonitorSelectionService
[CLSCompliantAttribute(false)]
public interface IMonitorSelectionService

IMonitorSelectionService 类型公开以下成员。

属性

  名称 说明
公共属性 CurrentDocument 获取活动文档。
公共属性 CurrentDocumentView 获取活动文档视图。
公共属性 CurrentSelectionContainer 获取活动选择容器。
公共属性 CurrentUndoManager 获取分配给活动文档窗口的 UndoManager
公共属性 CurrentWindow 获取处于活动状态的文档窗格或工具窗口窗格。
公共属性 CurrentWindowFrame 获取处于活动状态的文档框架或工具窗口框架。

页首

方法

  名称 说明
公共方法 GetCommandContextCookie 获取分配给指定命令 UI 上下文的 Cookie。
公共方法 IsCommandContextActive(Guid) 验证指定的命令 UI 是否处于活动状态。
公共方法 IsCommandContextActive(UInt32) 验证指定的 cookie 的命令 UI 是否处于活动状态。

页首

事件

  名称 说明
公共事件 CommandContextChanged 当命令 UI 上下文激活或停用时发生。
公共事件 DocumentChanged 在文档更改时发生。
公共事件 DocumentWindowChanged 当文档窗口更改时发生。
公共事件 SelectionChanged 当前所选内容更改时发生。
公共事件 UndoManagerChanged 在当前 UndoManager 更改时发生。
公共事件 WindowChanged 当帧更改时发生。

页首

请参阅

参考

Microsoft.VisualStudio.Modeling.Shell 命名空间