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

'宣言
Public Overridable Function CreateWindowPane ( _
    surface As DesignSurface _
) As DesignerWindowPane
'使用
Dim instance As WindowPaneProviderService
Dim surface As DesignSurface
Dim returnValue As DesignerWindowPane

returnValue = instance.CreateWindowPane(surface)
public virtual DesignerWindowPane CreateWindowPane(
    DesignSurface surface
)
public:
virtual DesignerWindowPane^ CreateWindowPane(
    DesignSurface^ surface
)
public function CreateWindowPane(
    surface : DesignSurface
) : DesignerWindowPane

Parameters

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 a 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 a 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.

Permissions

See Also

Reference

WindowPaneProviderService Class

WindowPaneProviderService Members

CreateWindowPane Overload

Microsoft.VisualStudio.Shell.Design Namespace