Version

LoadLayout(Stream,Boolean) Method

Loads a layout that was saved with the SaveLayout(Stream) method.
Syntax
'Declaration
 
Public Overloads Function LoadLayout( _
   ByVal stream As Stream, _
   ByVal processAsyncIfNeeded As Boolean _
) As Boolean
public bool LoadLayout( 
   Stream stream,
   bool processAsyncIfNeeded
)

Parameters

stream
The stream containing the saved layout.
processAsyncIfNeeded
True if the layout may be loaded asynchronously; false if the layout must be loaded synchronously.

Return Value

Returns false if the layout will be loaded asynchronously when the blocking operation completes; otherwise returns true to indicate that the load was completed synchronously.
Exceptions
ExceptionDescription
System.InvalidOperationExceptionThe layout cannot be loaded if the dockmanager is in an operation that doesn't allow it such as when a pane or tool window is being dragged. Pass true for the processAsyncIfNeeded to allow it to be loaded asynchronously when the blocking operation completes or wait for the IsLoadLayoutAllowed to return true.
Remarks

Note: The layout cannot be loaded synchronously if the dockmanager is in an operation that affects the pane layout such as dragging a pane or floating tool window. If the dock manager is in such a state and the processAsyncIfNeeded is false then an exception will be thrown. If the dock manager is in such a state and processAsyncIfNeeded is true then the data will be cached and the load will be performed when the blocking operation is complete.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also