wpf-devexpress-dot-xpf-dot-core-dot-iworkspacemanager-dot-saveworkspace-x28-system-dot-string-system-dot-object-x29.md
Saves the workspace with the specified name to a file or stream.
Namespace : DevExpress.Xpf.Core
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
bool SaveWorkspace(
string name,
object path
)
Function SaveWorkspace(
name As String,
path As Object
) As Boolean
| Name | Type | Description |
|---|---|---|
| name | String |
A String that specifies the name of the workspace to be saved.
| | path | Object |
The destination where the workspace is saved.
|
| Type | Description |
|---|---|
| Boolean |
true if the workspace has been successfully saved; otherwise, false.
|
The SaveWorkspace method can save workspaces to files and streams. To save a workspace to a file, pass the String, specifying the path to the file, as the path parameter. To save a workspace to a stream, pass the Stream object instead.
Use the IWorkspaceManager.LoadWorkspace method to load a workspace from a file or stream.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SaveWorkspace(String, Object) 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.
wpf-dock-layout-manager-upgrade-layouts-between-versions/CS/MainWindow.xaml.cs#L27
manager.CaptureWorkspace(workspaceName);
manager.SaveWorkspace(workspaceName, layoutPath);
}
wpf-dock-layout-manager-upgrade-layouts-between-versions/VB/MainWindow.xaml.vb#L35
manager.CaptureWorkspace(workspaceName)
manager.SaveWorkspace(workspaceName, layoutPath)
End Sub
See Also