DesignerActionList(IComponent) 构造函数

定义

初始化 DesignerActionList 类的新实例。Initializes a new instance of the DesignerActionList class.

public:
 DesignerActionList(System::ComponentModel::IComponent ^ component);
public DesignerActionList (System.ComponentModel.IComponent component);
new System.ComponentModel.Design.DesignerActionList : System.ComponentModel.IComponent -> System.ComponentModel.Design.DesignerActionList
Public Sub New (component As IComponent)

参数

component
IComponent

DesignerActionList 相关的组件。A component related to the DesignerActionList.

示例

下面的代码示例演示如何创建对象的DesignerActionItem集合。The following code example demonstrates how to create a collection of DesignerActionItem objects.

有关此代码示例的完整说明, 请参阅如何:将智能标记附加到 Windows 窗体组件For a complete explanation of this code example, see How to: Attach Smart Tags to a Windows Forms Component.

public ColorLabelActionList( IComponent component ) : base(component) 
{
    this.colLabel = component as ColorLabel;

    // Cache a reference to DesignerActionUIService, so the
    // DesigneractionList can be refreshed.
    this.designerActionUISvc =
        GetService(typeof(DesignerActionUIService))
        as DesignerActionUIService;
}
Public Sub New(ByVal component As IComponent)

    MyBase.New(component)
    Me.colLabel = component

    ' Cache a reference to DesignerActionUIService, so the
    ' DesigneractionList can be refreshed.
    Me.designerActionUISvc = _
    CType(GetService(GetType(DesignerActionUIService)), _
    DesignerActionUIService)

End Sub

注解

构造函数将属性设置为falseAutoShow DesignerActionListThe DesignerActionList constructor sets the AutoShow property to false.

适用于