共用方式為


IMonitorSelectionService 介面

監視目前的選取狀態,命令介面中。

此 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) 驗證指令 UI 內容,指定 cookie 是否為作用中。

回頁首

事件

  名稱 說明
公用事件 CommandContextChanged 當您啟動或停用命令的 UI 內容時,就會發生。
公用事件 DocumentChanged 當文件變更時發生。
公用事件 DocumentWindowChanged 變更文件視窗時發生。
公用事件 SelectionChanged 發生於目前選取變更時。
公用事件 UndoManagerChanged 發生於當目前的UndoManager的變更。
公用事件 WindowChanged 變更視窗框架時發生。

回頁首

請參閱

參考

Microsoft.VisualStudio.Modeling.Shell 命名空間