ISelectionService.SetSelectedComponents 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
選擇指定的元件。
多載
| 名稱 | Description |
|---|---|
| SetSelectedComponents(ICollection) |
選擇指定的元件集合。 |
| SetSelectedComponents(ICollection, SelectionTypes) |
從指定的元件集合中選擇符合指定選擇類型的元件。 |
SetSelectedComponents(ICollection)
選擇指定的元件集合。
public:
void SetSelectedComponents(System::Collections::ICollection ^ components);
public void SetSelectedComponents(System.Collections.ICollection? components);
public void SetSelectedComponents(System.Collections.ICollection components);
abstract member SetSelectedComponents : System.Collections.ICollection -> unit
Public Sub SetSelectedComponents (components As ICollection)
參數
- components
- ICollection
要選擇的組件集合。
備註
如果陣列包含 null 或不包含任何元件,則 SetSelectedComponents 會在設計器中選擇頂層元件。
適用於
SetSelectedComponents(ICollection, SelectionTypes)
從指定的元件集合中選擇符合指定選擇類型的元件。
public:
void SetSelectedComponents(System::Collections::ICollection ^ components, System::ComponentModel::Design::SelectionTypes selectionType);
public void SetSelectedComponents(System.Collections.ICollection? components, System.ComponentModel.Design.SelectionTypes selectionType);
public void SetSelectedComponents(System.Collections.ICollection components, System.ComponentModel.Design.SelectionTypes selectionType);
abstract member SetSelectedComponents : System.Collections.ICollection * System.ComponentModel.Design.SelectionTypes -> unit
Public Sub SetSelectedComponents (components As ICollection, selectionType As SelectionTypes)
參數
- components
- ICollection
要選擇的組件集合。
- selectionType
- SelectionTypes
一個來自 SelectionTypes 枚舉的數值。 預設值為 Normal。
備註
如果陣列包含 null 或不包含任何元件,則 SetSelectedComponents 會在設計器中選擇頂層元件。