Udostępnij przez


DesignerActionList(IComponent) Konstruktor

Definicja

Inicjuje nowe wystąpienie klasy DesignerActionList.

public:
 DesignerActionList(System::ComponentModel::IComponent ^ component);
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)

Parametry

component
IComponent

Składnik związany z elementem DesignerActionList.

Przykłady

W poniższym przykładzie kodu pokazano, jak utworzyć kolekcję DesignerActionItem obiektów.

Aby uzyskać pełne wyjaśnienie tego przykładu kodu, zobacz How to: Attach Smart Tags to a Windows Forms Component (Instrukcje: dołączanie tagów inteligentnych do składnika Windows Forms).

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

Uwagi

Konstruktor DesignerActionList ustawia AutoShow właściwość na false.

Dotyczy