BaseView.RestoreLayoutFromStream(Stream) Method
Restores the layout from a stream that contains data in binary format.
Namespace: DevExpress.XtraBars.Docking2010.Views
Assembly: DevExpress.XtraBars.v18.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
stream | Stream | The stream from which the layout should be restored. |
Remarks
Use the following methods to save the layout in the corresponding format/storage and subsequently restore it:
- XML/file system
- SaveLayoutToXml(String) — saves the layout in a specific file in XML format. The path parameter specifies the file to which the view writes the XML data. If the file does not exist, the view creates a new file.
- RestoreLayoutFromXml(String) — restores the layout from the specified XML file.
- XML/stream
- SaveLayoutToXml(Stream) — saves the layout in a specific stream in XML format. The stream parameter specifies the stream to which the view writes the XML data.
- SaveLayoutToStream(Stream, Boolean) — set the binaryStream parameter to false to save the layout in XML format.
- RestoreLayoutFromXml(Stream) — restores the layout from the specified stream.
- binary/stream
- SaveLayoutToStream(Stream) — saves the layout in a specific stream in binary format. The stream parameter specifies the stream to which the view writes the binary data.
- SaveLayoutToStream(Stream, Boolean) — set the binaryStream parameter to true to save the layout in binary format.
RestoreLayoutFromStream(Stream)
— restores the layout from the specified stream.
- registry
- SaveLayoutToRegistry(String) — saves the layout in the system registry.
- RestoreLayoutFromRegistry(String) — restores the layout from the system registry.
Note
The ControlName property should be set to a unique value for documents populated with the content on the fly (see Deferred Load). Otherwise, these documents cannot be restored.
Tip
You can also utilize the Persistence Behavior or Workspace Manager component to save and restore layouts for all supported DevExpress controls.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RestoreLayoutFromStream(Stream) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.