DesignSurface::BeginLoad Method (Type^)

 

Begins the loading process.

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

public:
void BeginLoad(
	Type^ rootComponentType
)

Parameters

rootComponentType
Type: System::Type^

The type of component to create in design mode.

Exception Condition
ArgumentNullException

rootComponentType is null.

ObjectDisposedException

The IDesignerHost attached to the DesignSurface has been disposed.

When rootComponentType is specified, a default designer loader that simply creates an instance of rootComponentType will be used. Designer loading can be asynchronous, so the loading may continue to progress after this call has returned. Attach an event handler to the LoadComplete event to be notified when the design surface has completed loading.

After BeginLoad is called, you can immediately obtain the view for the designer, because designer loaders must provide at least the root component when loading asynchronously.

System_CAPS_noteNote

The BeginLoad method creates an instance of the component type and initializes a designer for this instance. The Loaded event is raised before this method returns.

.NET Framework
Available since 2.0
Return to top
Show: