IComponentInitializer.InitializeExistingComponent(IDictionary) Method

Definition

Restores an instance of a component to its default state.

public:
 void InitializeExistingComponent(System::Collections::IDictionary ^ defaultValues);
public void InitializeExistingComponent (System.Collections.IDictionary defaultValues);
public void InitializeExistingComponent (System.Collections.IDictionary? defaultValues);
abstract member InitializeExistingComponent : System.Collections.IDictionary -> unit
Public Sub InitializeExistingComponent (defaultValues As IDictionary)

Parameters

defaultValues
IDictionary

A dictionary of default property values, which are name/value pairs, with which to reset the component's state.

Remarks

The InitializeExistingComponent method is called when a designer will re-initialize an existing component. For example, InitializeExistingComponent is commonly called after a drag-and-drop operation. The defaultValues parameter is a dictionary containing name/value pairs of default values that should be applied to properties of the associated component. This dictionary may be null if no default values have been specified.

Caution

When implementing this method, generally you should not modify the component properties beyond those recommendations found in defaultValue. The existing component may already have had its properties set by the user or other design-time code.

Applies to

See also