ComponentDesigner.InitializeNewComponent(IDictionary) 方法

定义

初始化新创建的组件。Initializes a newly created component.

public:
 virtual void InitializeNewComponent(System::Collections::IDictionary ^ defaultValues);
public virtual void InitializeNewComponent (System.Collections.IDictionary defaultValues);
abstract member InitializeNewComponent : System.Collections.IDictionary -> unit
override this.InitializeNewComponent : System.Collections.IDictionary -> unit
Public Overridable Sub InitializeNewComponent (defaultValues As IDictionary)

参数

defaultValues
IDictionary

要应用到属性的默认值的名称/值字典。A name/value dictionary of default values to apply to properties. 如果未指定默认值,可能为 nullMay be null if no default values are specified.

实现

注解

第一次初始化组件时调用 InitializeNewComponent 方法,通常是先将其添加到设计图面。The InitializeNewComponent method is called when a component is first initialized, typically after being first added to a design surface.

你可以执行此组件的任何必要的初始化,你可以完全忽略 defaultValues 字典。You may perform any necessary initialization of this component, and you may ignore the defaultValues dictionary altogether.

此方法的默认实现不执行任何操作。The default implementation of this method does nothing.

适用于