Full Docking Window Property Tracking (Including Window State)#1028
Merged
wieslawsoltes merged 4 commits intomasterfrom Feb 7, 2026
Merged
Full Docking Window Property Tracking (Including Window State)#1028wieslawsoltes merged 4 commits intomasterfrom
wieslawsoltes merged 4 commits intomasterfrom
Conversation
This was referenced Feb 11, 2026
Closed
This was referenced Feb 18, 2026
This was referenced Feb 25, 2026
This was referenced Mar 4, 2026
This was referenced Mar 6, 2026
Closed
This was referenced Mar 16, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary: Issue #1024 - Full Docking Window Property Tracking (Including Window State)
Branch
feature/issue-1024-window-state-trackingIssue
Problem
Floating dock windows persisted size and position, but did not fully persist/restore runtime window state (especially maximized/fullscreen scenarios). In managed mode, fullscreen intent could degrade to normal during MDI state synchronization.
What This PR Changes
1) Introduces explicit window state in dock model
DockWindowStateenum in core model:NormalMinimizedMaximizedFullScreenWindowStateproperty toIDockWindow.2) Extends host abstraction for state roundtrip
IHostWindow:SetWindowState(DockWindowState)GetWindowState()HostAdaptersoSave()captures host state andPresent()reapplies model state.3) Wires state into all dock window implementations
Updated all model variants to include serializable
WindowStatebacking/state propagation:Dock.Model.Avalonia.Core.DockWindowDock.Model.Mvvm.Core.DockWindowDock.Model.Inpc.Core.DockWindowDock.Model.Prism.Core.DockWindowDock.Model.CaliburMicro.Core.DockWindowDock.Model.ReactiveProperty.Core.DockWindowDock.Model.ReactiveUI.Core.DockWindow4) Avalonia host behavior and state fidelity
DockWindowStateHelperfor mapping:WindowState<->DockWindowStateMdiWindowState<->DockWindowStateHostWindownow:IHostWindowAPI.WindowStatechanges while tracked.ManagedHostWindownow:WindowStatebefore MDI sync.Normal.ManagedDockWindowDocumentnow:5) Serialization updates
WindowStateforIDockWindow/DockWindow.6) Documentation updates
Updated docs to reflect new API and behavior:
docfx/articles/dock-windows.mddocfx/articles/dock-adapters.mddocfx/articles/dock-serialization.mddocfx/articles/dock-enums.mdCommits (Granular)
d024471e7- Add dock window state model and serialization plumbing496baacae- Track and preserve host window state in Avalonia hosts49b1e9a69- Add window state regression and roundtrip tests7805556c8- Document dock window state persistence and APIsTests Added/Updated
Model and adapter tests
Avalonia tests
HostWindowMethodsTests: explicit host window state API coverage.DockControlMainWindowTests: custom host state method coverage.ManagedWindowParityTests:Serializer tests
DockLayoutRoundtripTests: verifies floatingIDockWindow.WindowStatesurvives serializer roundtrip.AvaloniaDockSerializerTests: ensuresWindowStateis emitted.Validation Run
Executed and passing:
dotnet test tests/Dock.Model.ReactiveUI.UnitTests/Dock.Model.ReactiveUI.UnitTests.csproj --nologodotnet test tests/Dock.Model.Prism.UnitTests/Dock.Model.Prism.UnitTests.csproj --nologodotnet test tests/Dock.Model.CaliburMicro.UnitTests/Dock.Model.CaliburMicro.UnitTests.csproj --nologodotnet test tests/Dock.Serializer.UnitTests/Dock.Serializer.UnitTests.csproj --nologodotnet test tests/Dock.Model.Avalonia.UnitTests/Dock.Model.Avalonia.UnitTests.csproj --nologodotnet test tests/Dock.Avalonia.HeadlessTests/Dock.Avalonia.HeadlessTests.csproj --nologodotnet build Dock.slnx --nologoNotable Compatibility Note
IDockWindowandIHostWindowinterface surfaces were extended (intentional API expansion). External custom implementations must implement the new members.PR Link
Fixes #1024