监视在 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 | ,当窗架更改,发生。 |
页首