ModelingWindowPane.SetSelectedComponents 方法 (ICollection)
將指定的元件加入至選取項目容器,並通知 [選取範圍變更的骨架之後。
命名空間: Microsoft.VisualStudio.Modeling.Shell
組件: Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0 (在 Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0.dll 中)
語法
'宣告
Public Overridable Sub SetSelectedComponents ( _
components As ICollection _
)
public virtual void SetSelectedComponents(
ICollection components
)
參數
- components
型別:System.Collections.ICollection
選取的元件集合。
實作
ISelectionService.SetSelectedComponents(ICollection)
備註
如果components是nullnull 參考 (即 Visual Basic 中的 Nothing),會使用空的元件集合。
選取容器中現有的項目所取代的新加入的項目。
如果選取項目容器的內容修改時,這個方法會呼叫OnSelectionChanging和OnSelectionChanged。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。