DesignSurfaceManager::CreateDesignSurface Method (IServiceProvider^)
Creates an instance of a design surface.
Assembly: System.Design (in System.Design.dll)
Parameters
- parentProvider
-
Type:
System::IServiceProvider^
A parent service provider. A new merged service provider will be created that will first ask this provider for a service, and then delegate any failures to the design surface manager object. This merged provider will be passed into the CreateDesignSurfaceCore method.
| Exception | Condition |
|---|---|
| ArgumentNullException | parentProvider is null. |
If you want to conveniently add additional per-designer services, use the parentProvider parameter to provide a service provider for this design surface. The CreateDesignSurface method creates a merged service provider that can satisfy service requests from both the given service provider as well as the DesignSurfaceManager itself. The CreateDesignSurface method then passes this service provider into the CreateDesignSurfaceCore method.
After CreateDesignSurfaceCore returns the design surface, the CreateDesignSurface method tries to obtain the IDesignerEventService. If it is present, and if it is the instance of the service that DesignSurfaceManager provided by default, the CreateDesignSurface method raises the DesignerCreated event.
Notes to Inheritors:
If an external implementation of the service was provided, it is the responsibility of the class that derives from the DesignSurfaceManager class to raise the DesignerCreated event.
Available since 2.0