Delen via


WindowPaneProviderService.CreateWindowPane Method (DesignSurface)

Creates a window pane for the specified design surface.

Namespace:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'Declaration
Public Overridable Function CreateWindowPane ( _
    surface As DesignSurface _
) As DesignerWindowPane
public virtual DesignerWindowPane CreateWindowPane(
    DesignSurface surface
)
public:
virtual DesignerWindowPane^ CreateWindowPane(
    DesignSurface^ surface
)
abstract CreateWindowPane : 
        surface:DesignSurface -> DesignerWindowPane  
override CreateWindowPane : 
        surface:DesignSurface -> DesignerWindowPane
public function CreateWindowPane(
    surface : DesignSurface
) : DesignerWindowPane

Parameters

  • surface
    Type: DesignSurface

    The DesignSurface from which the window pane is created.

Return Value

Type: Microsoft.VisualStudio.Shell.Design.DesignerWindowPane
The created DesignerWindowPane.

Remarks

This method throws an appropriate exception if the window pane cannot be created. Normally this occurs if either the design surface is not ready to provide a view, or if no compatible view technology providers are registered. It throws the exception ArgumentNullException if surface is nulla null reference (Nothing in Visual Basic). In Visual Studio 2005 SDK DocData is initialized at the beginning but this was not always the case. For backwards compatibility the code confirms that loading was successful. If it was, and if the root component is nulla null reference (Nothing in Visual Basic), then assume Windows Forms as the view technology. If that is the case, the default behavior is to create a windows forms view by calling CreateWindowPane.

.NET Framework Security

See Also

Reference

WindowPaneProviderService Class

CreateWindowPane Overload

Microsoft.VisualStudio.Shell.Design Namespace