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
。