System.ComponentModel.Design.IComponentInitializer.InitializeExistingComponent Method

Restores an instance of a component to its default state.

Syntax

public void InitializeExistingComponent (IDictionary defaultValues)

Parameters

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

Remarks

The IComponentInitializer.InitializeExistingComponent(IDictionary) method is called when a designer will re-initialize an existing component. For example, IComponentInitializer.InitializeExistingComponent(IDictionary) 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.

Note:

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.

Requirements

Namespace: System.ComponentModel.Design
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0