IMonitorSelectionService 接口

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

此 API 不兼容 CLS。 

命名空间:  Microsoft.VisualStudio.Modeling.Shell
程序集:  Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0(在 Microsoft.VisualStudio.Modeling.Sdk.Shell.11.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 命名空间