DesignSurface Constructor (IServiceProvider^, Type^)

 

Initializes a new instance of the DesignSurface class.

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

public:
DesignSurface(
	IServiceProvider^ parentProvider,
	Type^ rootComponentType
)

Parameters

parentProvider
Type: System::IServiceProvider^

The parent service provider, or null if there is no parent used to resolve services.

rootComponentType
Type: System::Type^

The type of root component to create.

Exception Condition
ArgumentNullException

rootComponent is null.

ObjectDisposedException

The IDesignerHost attached to the DesignSurface has been disposed.

Using the DesignSurface constructor creates a simple designer loader that creates a component of the given type and then ends the loading process. This is a straightforward way to create a designer, under the assumption that all saving of state will be done externally. Internally, this calls BeginLoad and passes the root component type.

.NET Framework
Available since 2.0
Return to top
Show: