通过


DesignerActionService.Add 方法

定义

将一个或多个 DesignerActionList 对象添加到托管智能标记的当前集合。

重载

名称 说明
Add(IComponent, DesignerActionList)

向托管智能标记的当前集合添加一个 DesignerActionList

Add(IComponent, DesignerActionListCollection)

向托管智能标记的当前集合添加一个 DesignerActionListCollection

Add(IComponent, DesignerActionList)

Source:
DesignerActionService.cs
Source:
DesignerActionService.cs
Source:
DesignerActionService.cs
Source:
DesignerActionService.cs
Source:
DesignerActionService.cs

向托管智能标记的当前集合添加一个 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 相应组件的设计器中的属性。

调用此方法时,将扫描要添加的列表,查找属性设置为 trueIncludeAsDesignerVerb 的任何DesignerActionMethodItem列表。 通过调用 MenuCommandService.AddVerb 方法,将这些项添加到此组件的设计器谓词列表中。

智能标记基于组件实例进行管理。 托管集合可能包含重复的条目。

此方法引发 DesignerActionListsChanged 事件。

另请参阅

适用于

Add(IComponent, DesignerActionListCollection)

Source:
DesignerActionService.cs
Source:
DesignerActionService.cs
Source:
DesignerActionService.cs
Source:
DesignerActionService.cs
Source:
DesignerActionService.cs

向托管智能标记的当前集合添加一个 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 相应组件的设计器中的属性。

调用此方法时,将扫描要添加的列表,查找属性设置为 trueIncludeAsDesignerVerb 的任何DesignerActionMethodItem列表。 通过调用 MenuCommandService.AddVerb 方法,将这些项添加到此组件的设计器谓词列表中。

智能标记基于组件实例进行管理。 托管集合可能包含重复的条目。

此方法引发 DesignerActionListsChanged 事件。

另请参阅

适用于