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 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
。