DesignerActionList(IComponent) Konstruktor

Definition

Initierar en ny instans av DesignerActionList klassen.

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)

Parametrar

component
IComponent

En komponent som är relaterad till DesignerActionList.

Exempel

Följande kodexempel visar hur du skapar en samling DesignerActionItem objekt.

En fullständig förklaring av det här kodexemplet finns i 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

Kommentarer

Konstruktorn DesignerActionList anger AutoShow egenskapen till false.

Gäller för