DesignerActionService.Add 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将一个或多个 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 事件。
另请参阅
- DesignerActionList
- ActionLists
- Remove
- Contains(IComponent)
- 适用于 Windows 窗体的 Designer 命令和 DesignerAction 对象模型
适用于
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 事件。
另请参阅
- DesignerActionList
- ActionLists
- Remove
- Contains(IComponent)
- 适用于 Windows 窗体的 Designer 命令和 DesignerAction 对象模型