DesignerActionService.Add 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将一个或多个 DesignerActionList 对象添加到当前的托管智能标记集合。
Add(IComponent, DesignerActionList) |
将 DesignerActionList 添加到当前的托管智能标记集合。 |
Add(IComponent, DesignerActionListCollection) |
将 DesignerActionListCollection 添加到当前的托管智能标记集合。 |
将 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 相应组件的 属性。
调用此方法时,将扫描要添加的列表, DesignerActionMethodItem 其中 IncludeAsDesignerVerb 属性设置为 true
。 通过调用 MenuCommandService.AddVerb 方法,这些项将添加到此组件的设计器谓词列表中。
智能标记基于组件实例进行管理。 托管集合可能包含重复的条目。
此方法引发 DesignerActionListsChanged 事件。
另请参阅
适用于
.NET Framework 4.8.1 和其他版本
产品 | 版本 |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
将 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 相应组件的 属性。
调用此方法时,将扫描要添加的列表, DesignerActionMethodItem 其中 IncludeAsDesignerVerb 属性设置为 true
。 通过调用 MenuCommandService.AddVerb 方法,这些项将添加到此组件的设计器谓词列表中。
智能标记基于组件实例进行管理。 托管集合可能包含重复的条目。
此方法引发 DesignerActionListsChanged 事件。
另请参阅
适用于
.NET Framework 4.8.1 和其他版本
产品 | 版本 |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |