DesignerActionService.GetComponentActions 方法

定義

傳回與元件相關聯的智慧標籤項目清單集合。

多載

GetComponentActions(IComponent)

傳回與元件相關聯的智慧標籤項目清單集合。

GetComponentActions(IComponent, ComponentActionsType)

傳回與元件相關聯之指定型別的智慧標籤項目清單集合。

GetComponentActions(IComponent, ComponentActionsType)

傳回與元件相關聯之指定型別的設計工具動作專案清單集合。

GetComponentActions(IComponent)

傳回與元件相關聯的智慧標籤項目清單集合。

public:
 System::ComponentModel::Design::DesignerActionListCollection ^ GetComponentActions(System::ComponentModel::IComponent ^ component);
public System.ComponentModel.Design.DesignerActionListCollection GetComponentActions (System.ComponentModel.IComponent component);
member this.GetComponentActions : System.ComponentModel.IComponent -> System.ComponentModel.Design.DesignerActionListCollection
Public Function GetComponentActions (component As IComponent) As DesignerActionListCollection

參數

component
IComponent

智慧標籤所關聯的元件。

傳回

指定之元件的智慧標籤集合。

例外狀況

compnull

備註

方法GetComponentActions相當於使用 typeAll參數呼叫 GetComponentActions(IComponent, ComponentActionsType) 方法。 因此,傳回的集合會同時包含智慧標記的推送和提取清單。

DesignerActionListCollection 回的專案清單聯集是透過 Add 方法新增的專案清單,以及從 DesignerCommandSet 元件月臺取得之實例取得的清單。

另請參閱

適用於

GetComponentActions(IComponent, ComponentActionsType)

傳回與元件相關聯之指定型別的智慧標籤項目清單集合。

public:
 virtual System::ComponentModel::Design::DesignerActionListCollection ^ GetComponentActions(System::ComponentModel::IComponent ^ component, System::ComponentModel::Design::ComponentActionsType type);
public virtual System.ComponentModel.Design.DesignerActionListCollection GetComponentActions (System.ComponentModel.IComponent component, System.ComponentModel.Design.ComponentActionsType type);
abstract member GetComponentActions : System.ComponentModel.IComponent * System.ComponentModel.Design.ComponentActionsType -> System.ComponentModel.Design.DesignerActionListCollection
override this.GetComponentActions : System.ComponentModel.IComponent * System.ComponentModel.Design.ComponentActionsType -> System.ComponentModel.Design.DesignerActionListCollection
Public Overridable Function GetComponentActions (component As IComponent, type As ComponentActionsType) As DesignerActionListCollection

參數

component
IComponent

智慧標籤所關聯的元件。

type
ComponentActionsType

要用於篩選相關聯智慧標籤的 ComponentActionsType

傳回

指定之型別 (屬於指定的元件) 的智慧標籤集合。

例外狀況

compnull

備註

這個版本的多載 GetComponentActions 方法會篩選 type 參數,它可以有下列其中一個值。

說明
All 所有相關聯的智慧標記。
Component 僅限提取模型智慧標記。
Service 僅限推送模型智能標記。

如果元件的相關聯設計工具未提供提取模型智慧標記清單,則 GetComponentActions 方法會改用 Verbs 屬性的設計時間快捷方式功能表項。

另請參閱

適用於

GetComponentActions(IComponent, ComponentActionsType)

傳回與元件相關聯之指定型別的設計工具動作專案清單集合。

public:
 virtual System::ComponentModel::Design::DesignerActionListCollection ^ GetComponentActions(System::ComponentModel::IComponent ^ component, System::Windows::Forms::Design::ComponentActionsType type);
public virtual System.ComponentModel.Design.DesignerActionListCollection GetComponentActions (System.ComponentModel.IComponent component, System.Windows.Forms.Design.ComponentActionsType type);
abstract member GetComponentActions : System.ComponentModel.IComponent * System.Windows.Forms.Design.ComponentActionsType -> System.ComponentModel.Design.DesignerActionListCollection
override this.GetComponentActions : System.ComponentModel.IComponent * System.Windows.Forms.Design.ComponentActionsType -> System.ComponentModel.Design.DesignerActionListCollection
Public Overridable Function GetComponentActions (component As IComponent, type As ComponentActionsType) As DesignerActionListCollection

參數

component
IComponent

DesignerActions 相關聯的元件。

type
ComponentActionsType

ComponentActionsType 用來篩選相關聯的設計工具動作。

傳回

指定之元件之指定型別的設計工具動作集合。

例外狀況

componentnull

備註

這個版本的多載 GetComponentActions 方法會篩選 type 參數,它可以有下列其中一個值。

說明
All 所有相關聯的設計工具動作。
Component 僅限提取模型設計工具動作。
Service 僅限推送模型設計工具動作。

如果元件的相關聯設計工具未提供提取模型設計工具動作清單,則 GetComponentActions 方法會改用屬性 Verbs 的設計時間快捷方式功能表項。

適用於