DesignerActionList(IComponent) 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 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 表單元件」。
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。