共用方式為


DesignerActionList(IComponent) 建構函式

定義

初始化 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)

參數

component
IComponent

DesignerActionList 相關的元件。

範例

下列程式代碼範例示範如何建立 物件的集合 DesignerActionItem

如需此程式碼範例的完整說明,請參閱如何:將智慧標記附加至 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

備註

DesignerActionList 構函式會將 AutoShow 屬性設定為 false

適用於