Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Collapse]Form Layout Managers
    Side Panel
   [Expand]Layout Manager
   [Expand]Tabbed MDI Manager
    Tab Control
   [Expand]Wizard Control
    Workspace Manager
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Workspace Manager

Many DevExpress controls provide methods to save their current layouts to a file, registry or stream, and then restore these layouts later on. These methods are sufficient when you need to manage a layout for one particular control. On the other hand, when your application contains multiple controls (toolbars, grid, navigation bar, etc.), saving/restoring the layout of each one of them manually becomes complicated. In such a case, the perfect solution would be to utilize the Workspace Manager (WorkspaceManager) component.

The Workspace Manager is a compact tool that detects all supported DevExpress controls within the target container (form, user control) and operates their layouts as one global application layout, called workspace. The list below enumerates major DevExpress controls supported by the Workspace Manager.

You can create multiple predefined application workspaces that your users will be able to choose from, as well as save and restore their own custom workspaces.

Expanded Getting Started (online video)

Expanded Concepts

The manager uses four methods that operate workspaces.

As you may have noticed, all of these methods work with the WorkspaceManager.Workspaces collection - the place where all active workspaces are stored. Active workspaces are those that are ready to be applied. If a workspace is stored in a file but has not been loaded yet, it is considered inactive. To add predefined workspaces to your application as active workspaces, design them first, then save to XML files and load when the application starts, for instance on the FormLoad event.

The manager searches for all supported controls within the object, assigned to its WorkspaceManager.TargetControl property.

Expanded Bar Workspace Menu

To assist both you and your end-users in creating, saving and loading workspaces, the Workspace Manager provides a bar menu, represented by the BarWorkspaceMenuItem class. This item can be added to the required Bar or RibbonControl as the image below illustrates.

By default, this item only displays the active workspaces list and a button to capture the current workspace.

You can set the button's ShowSaveLoadCommands property to true to display additional commands, which allow your end-users to save and load workspaces at runtime.

You can use this menu when developing the application to quickly design and save to files various layout versions. Afterwards you can set the ShowSaveLoadCommands property back to its default false value.

Switching between workspaces can be followed by animation effects. You can choose from eight animation types, available out-of-the-box, by selecting them from a control's smart-tag. To do the same in code, create the required animation and assign it to the WorkspaceManager.TransitionType property.

Expanded Example

How would you rate this topic?​​​​​​​