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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.