IComponentInitializer::InitializeExistingComponent Method (IDictionary^)

 

Restores an instance of a component to its default state.

Namespace:   System.ComponentModel.Design
Assembly:  System (in System.dll)

void InitializeExistingComponent(
	IDictionary^ defaultValues
)

Parameters

defaultValues
Type: System.Collections::IDictionary^

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

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.

System_CAPS_cautionCaution

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.

.NET Framework
Available since 2.0
Return to top
Show: