DesignerActionService.Add 方法

定義

將一或多個 DesignerActionList 物件加入受管理智慧標籤的目前集合。

多載

Add(IComponent, DesignerActionList)

DesignerActionList 加入受管理智慧標籤的目前集合。

Add(IComponent, DesignerActionListCollection)

DesignerActionListCollection 加入受管理智慧標籤的目前集合。

Add(IComponent, DesignerActionList)

DesignerActionList 加入受管理智慧標籤的目前集合。

public:
 void Add(System::ComponentModel::IComponent ^ comp, System::ComponentModel::Design::DesignerActionList ^ actionList);
public void Add (System.ComponentModel.IComponent comp, System.ComponentModel.Design.DesignerActionList actionList);
member this.Add : System.ComponentModel.IComponent * System.ComponentModel.Design.DesignerActionList -> unit
Public Sub Add (comp As IComponent, actionList As DesignerActionList)

參數

comp
IComponent

智慧標籤要與其關聯的 IComponent

actionList
DesignerActionList

包含要加入之新智慧標籤項目的 DesignerActionList

例外狀況

其中一或二個參數都為 null

備註

方法 Add 代表新增智慧標記專案的推送模型。 替代提取模型依賴覆寫 ActionLists 設計工具中對應的元件的屬性。

呼叫這個方法時,會掃描要新增的清單是否有任何DesignerActionMethodItemIncludeAsDesignerVerb屬性設定為 true。 這些專案會透過呼叫 MenuCommandService.AddVerb 方法,新增至此元件的設計工具動詞清單。

智慧標記是以元件實例為基礎進行管理。 Managed 集合可能包含重複的專案。

這個方法會 DesignerActionListsChanged 引發事件。

另請參閱

適用於

Add(IComponent, DesignerActionListCollection)

DesignerActionListCollection 加入受管理智慧標籤的目前集合。

public:
 void Add(System::ComponentModel::IComponent ^ comp, System::ComponentModel::Design::DesignerActionListCollection ^ designerActionListCollection);
public void Add (System.ComponentModel.IComponent comp, System.ComponentModel.Design.DesignerActionListCollection designerActionListCollection);
member this.Add : System.ComponentModel.IComponent * System.ComponentModel.Design.DesignerActionListCollection -> unit
Public Sub Add (comp As IComponent, designerActionListCollection As DesignerActionListCollection)

參數

comp
IComponent

智慧標籤要與其關聯的 IComponent

designerActionListCollection
DesignerActionListCollection

包含要加入之新智慧標籤項目的 DesignerActionListCollection

例外狀況

其中一或二個參數都為 null

備註

方法 Add 代表新增智慧標記專案的推送模型。 替代提取模型依賴覆寫 ActionLists 設計工具中對應的元件的屬性。

呼叫這個方法時,會掃描要新增的清單是否有任何DesignerActionMethodItemIncludeAsDesignerVerb屬性設定為 true。 這些專案會透過呼叫 MenuCommandService.AddVerb 方法,新增至此元件的設計工具動詞清單。

智慧標記是以元件實例為基礎進行管理。 Managed 集合可能包含重複的專案。

這個方法會 DesignerActionListsChanged 引發事件。

另請參閱

適用於