监视 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 | 当帧更改时发生。 |
页首