[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Collapse]Layout Management
   [Expand]Dock Windows
   [Expand]Tile and Layout
   [Expand]Tab Control
    Book Control
    Workspace Manager
  [Expand]Windows Modern UI
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Workspace Manager

The DXWorkspaceManager control allows you to easily manipulate layouts of various DevExpress controls.

Expanded Workspace Manager Overview

Nearly all DevExpress controls allow end-users to change their layouts (states). For example, the Dock Windows and Bars libraries allow you to rearrange panels, toolbars and commands within toolbars. The Data Grid control allows you to change the order of columns, sort, group data, etc.

The layouts of these controls can be saved to a data store and then restored later. The WorkspaceManager component makes manipulating layouts of DevExpress controls much easier. You can create multiple layouts for visual controls in advance, and then use the WorkspaceManager to instantly switch between them at runtime.

The WorkspaceManager can be used with any DevExpress visual control that supports serialization (e.g., BarManager, DockLayoutManager, GridControl, etc.). The target visual control may also contain other serializable DevExpress controls as children. For instance, the BarManager may contain a DockLayoutManager child object. In this example, the WorkspaceManager will manipulate child control layouts as well.

Additionally, the WorkspaceManager supports multiple visual transition effects applied when loading a selected layout. See the WorkspaceManager.TransitionEffect topic to learn more.

Expanded Using the Workspace Manager

Each WorkspaceManager instance is associated with a particular visual control (target control). To create a WorkspaceManager, set the WorkspaceManager.IsEnabled attached property for a visual control to true. A new WorkspaceManager instance will be created and associated with this control. You can now obtain it via the WorkspaceManager.WorkspaceManager attached property.

The WorkspaceManager manipulates layouts of the target control and its child controls, so it stores each layout of the target control together with the corresponding layouts of the child controls, arranged into a workspace. Workspaces are identified by their names and stored in the WorkspaceManager.Workspaces collection. A new workspace can be created by capturing the current state of the target control via the WorkspaceManager.CaptureWorkspace method. To apply a previously captured workspace, use the WorkspaceManager.ApplyWorkspace method. The workspaces can be saved to a file or stream using the WorkspaceManager.SaveWorkspace method, and then loaded again with the WorkspaceManager.LoadWorkspace method.

You can also use the WorkspaceManager.TransitionEffect property to specify a visual effect applied when switching between workspaces.

The WorkspaceManager fires the WorkspaceManager.BeforeApplyWorkspace event after the WorkspaceManager.ApplyWorkspace method has been called, but before it applies a workspace. After the WorkspaceManager.ApplyWorkspace method has applied the workspace, the WorkspaceManager.AfterApplyWorkspace event occurs.

Expanded Example

Is this topic helpful?​​​​​​​