Save and restore workspaces

Layout Persistence

Let users return to the workspace they arranged.

Explore source
Parent systemDock
StatusStable
Modules5
RepositoryDock/Dock.Serializer.SystemTextJson

Serializer packages preserve Dock layouts through System.Text.Json, Newtonsoft.Json, XML, YAML, and Protobuf while keeping persistence outside the UI layer.

  1. 01

    Five serializer choices

  2. 02

    Model-only persistence boundary

  3. 03

    User workspace restoration

  4. 04

    Application-controlled rehydration

From intent
to working system.

01

Capture

The current model tree supplies dockable identity and layout state.

02

Serialize

A selected package converts the graph to the chosen wire format.

03

Store

Applications own files, profiles, cloud state, and versioning.

04

Restore

The factory reconnects services, contexts, and runtime-only state.

Adopt this
capability.

Start with the primary module, then add the related packages only when the application needs those layers. Replace VERSION with the current NuGet version.

01 · Install
Terminal
dotnet add package Dock.Serializer.SystemTextJson
02 · Use · csharp
QuickStart.cs
var serializer = new DockSerializer();
await using var stream = File.Create("layout.json");
serializer.Save(stream, Layout);
// Restore and reinitialize with the application factory.

Use one layer.
Compose the rest.

Read the module beside the complete system.

The implementation, samples, issues, and release notes stay in the parent repository so module details remain connected to the product architecture.

Dock

Search everything.

Loading the index…

move open esc close

Preparing metadata and full-text search…