DesignerActionService.GetComponentActions 方法

定义

返回与某个组件关联的智能标记项列表的集合。Returns the collection of smart tag item lists associated with a component.

重载

GetComponentActions(IComponent)

返回与某个组件关联的智能标记项列表的集合。Returns the collection of smart tag item lists associated with a component.

GetComponentActions(IComponent, ComponentActionsType)

返回与某个组件关联的指定类型的智能标记项列表的集合。Returns the collection of smart tag item lists of the specified type associated with a component.

GetComponentActions(IComponent, ComponentActionsType)

GetComponentActions(IComponent)

返回与某个组件关联的智能标记项列表的集合。Returns the collection of smart tag item lists associated with a component.

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

与智能标记关联的组件。The component that the smart tags are associated with.

返回

指定组件的智能标记集合。The collection of smart tags for the specified component.

异常

compnullcomp is null.

注解

方法等效于使用GetComponentActions(IComponent, ComponentActionsType) All的参数对方法的调用。 type GetComponentActionsThe GetComponentActions method is equivalent to a call to the GetComponentActions(IComponent, ComponentActionsType) method using a type parameter of All. 因此, 返回的集合将包含智能标记的推送列表和请求列表。Therefore, the collection returned will contain both the push and pull lists of smart tags.

返回DesignerActionListCollection的是Add通过方法添加的项列表的联合, 还是从组件的站点获取DesignerCommandSet的实例中获取的列表。The returned DesignerActionListCollection is the union of item lists added through the Add methods and also the lists obtained from the DesignerCommandSet instance obtained from the component's site.

另请参阅

GetComponentActions(IComponent, ComponentActionsType)

返回与某个组件关联的指定类型的智能标记项列表的集合。Returns the collection of smart tag item lists of the specified type associated with a component.

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

与智能标记关联的组件。The component that the smart tags are associated with.

type
ComponentActionsType

用于筛选关联的智能标记的 ComponentActionsTypeThe ComponentActionsType to filter the associated smart tags with.

返回

指定组件的指定类型的智能标记集合。The collection of smart tags of the specified type for the specified component.

异常

compnullcomp is null.

注解

此版本的重载GetComponentActions方法筛选type参数, 该参数可以具有下列值之一。This version of the overloaded GetComponentActions method filters on the type parameter, which can have one of the following values.

Value 说明Description
All 所有关联的智能标记。All associated smart tags.
Component 仅请求模型智能标记。Pull-model smart tags only.
Service 仅推送模型智能标记。Push-model smart tags only.

如果组件的关联设计器未提供请求模型智能标记列表, 则该GetComponentActions方法将改为使用Verbs属性中设计器的设计时快捷菜单项。If the associated designer for a component does not supply a pull-model smart tag list, then the GetComponentActions method will instead use the designer's design-time shortcut menu items from the Verbs property.

另请参阅

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

返回

适用于