DesignSurfaceManager.CreateDesignSurface Method (IServiceProvider)
Creates an instance of a design surface.
Assembly: System.Design (in System.Design.dll)
- 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.
Return ValueType: System.ComponentModel.Design.DesignSurface
A new design surface instance.
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