共用方式為


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
)

參數

實作

ISelectionService.SetSelectedComponents(ICollection)

備註

如果components是nullnull 參考 (即 Visual Basic 中的 Nothing),會使用空的元件集合。

選取容器中現有的項目所取代的新加入的項目。

如果選取項目容器的內容修改時,這個方法會呼叫OnSelectionChangingOnSelectionChanged

.NET Framework 安全性

請參閱

參考

ModelingWindowPane 類別

SetSelectedComponents 多載

Microsoft.VisualStudio.Modeling.Shell 命名空間