共用方式為


IMonitorSelectionService.CurrentSelectionContainer 屬性

取得動態選取項目容器。

命名空間:  Microsoft.VisualStudio.Modeling.Shell
組件:  Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0 (在 Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0.dll 中)

語法

'宣告
ReadOnly Property CurrentSelectionContainer As Object
Object CurrentSelectionContainer { get; }

屬性值

型別:System.Object
動態選取項目容器。

備註

衍生自目前的選取範圍的命令處理常式應該使用這個屬性,而不是CurrentWindow屬性因為可能未選取容器具有焦點的視窗。

.NET Framework 安全性

請參閱

參考

IMonitorSelectionService 介面

Microsoft.VisualStudio.Modeling.Shell 命名空間