ToolDock ItemsSource + Template Parity#1036
Merged
wieslawsoltes merged 5 commits intomasterfrom Feb 10, 2026
Merged
Conversation
This was referenced Feb 11, 2026
Closed
This was referenced Feb 18, 2026
Closed
This was referenced Feb 25, 2026
This was referenced Mar 2, 2026
This was referenced Mar 9, 2026
Closed
This was referenced Mar 18, 2026
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: ToolDock ItemsSource + Template Parity
Branch
feature/tooldock-itemssource-parityCommits
7d0330875feat(model): add ToolDock ItemsSource and template integrationf0da6cbe0test(avalonia): expand ToolDock ItemsSource interop coverageddd46eaaafeat(sample): add DockReactiveUI ItemsSource samplea7e4df25bdocs(docfx): document ToolDock ItemsSource and template supportGoal
Implement full ToolDock ItemsSource parity with existing DocumentDock-style workflows and Actipro-inspired UX expectations:
What Was Implemented
1) New contracts and Avalonia model types
Added dedicated tool ItemsSource/template contracts mirroring document patterns:
src/Dock.Model/Core/IToolItemsSourceDock.cssrc/Dock.Model/Controls/IToolDockContent.cssrc/Dock.Model/Controls/IToolTemplate.cssrc/Dock.Model.Avalonia/Controls/ToolTemplate.cs2) ToolDock runtime support
ToolDocknow supports:ToolTemplatestyled propertyItemsSourcestyled propertyRemoveItemFromSource)IsToolFromItemsSource)Primary file:
src/Dock.Model.Avalonia/Controls/ToolDock.cs3) Close/hide semantics for source-generated dockables
Factory close behavior now treats ItemsSource-generated tool/document dockables as source-owned entries that must be removed, not hidden, to keep source collections and UI synchronized.
Primary file:
src/Dock.Model/FactoryBase.Dockable.cs4) Cross-dock move robustness (source provenance tracking)
When a source-generated dockable is moved to another dock, close/remove still resolves back to its original ItemsSource owner via tracking in factory:
Primary files:
src/Dock.Model/FactoryBase.cssrc/Dock.Model/FactoryBase.Dockable.cs5) DocumentDock parity hardening
Aligned document path with the same robustness improvements:
Primary file:
src/Dock.Model.Avalonia/Controls/DocumentDock.cs6) Serialization, state, and fluent API integration
Added/updated support so new ToolTemplate/ItemsSource-related model structure integrates with state capture and serializers:
src/Dock.Model/DockState.cssrc/Dock.Model/DockService.cssrc/Dock.Model/FluentExtensions.cssrc/Dock.Model.Avalonia/Json/AvaloniaModelPolymorphicTypeResolver.cssrc/Dock.Serializer.SystemTextJson/DockModelPolymorphicTypeResolver.cssrc/Dock.Serializer.Xml/DockXmlSerializer.cssrc/Dock.Serializer.Yaml/DockYamlSerializer.cssrc/Dock.Serializer.Protobuf/ProtobufDockSerializer.csSample App
Added a dedicated sample demonstrating document + tool ItemsSource usage together in ReactiveUI:
samples/DockReactiveUIItemsSourceSample/*Dock.slnxTests Added/Extended
New tests
tests/Dock.Model.Avalonia.UnitTests/Controls/ToolDockItemsSourceTests.cstests/Dock.Avalonia.HeadlessTests/ToolDockItemsSourceTests.cstests/Dock.Avalonia.HeadlessTests/ToolDockTemplateTests.cstests/Dock.Avalonia.LeakTests/ToolDockItemsSourceLeakTests.cstests/Dock.Model.UnitTests/DockStateToolTemplateTests.csUpdated tests
tests/Dock.Model.Avalonia.UnitTests/Controls/DocumentDockItemsSourceSampleTests.cstests/Dock.Model.Avalonia.UnitTests/AvaloniaDockSerializerTests.cstests/Dock.Model.Avalonia.UnitTests/Controls/DockControlsTests.cstests/Dock.Avalonia.HeadlessTests/DockControlsTests.cstests/Dock.Avalonia.HeadlessTests/FactoryWindowTests.csCovered scenarios
Docs Updated
Updated DocFX articles for API and usage guidance:
docfx/articles/dock-itemssource.mddocfx/articles/dock-content-guide.mddocfx/articles/dock-model-controls.mddocfx/articles/dock-reference.mddocfx/articles/dock-state.mddocfx/articles/dock-faq.mddocfx/articles/dock-advanced.mddocfx/articles/dock-reactiveui.mddocfx/articles/dock-reactiveui-di.mddocfx/articles/toc.ymldocfx/index.mdValidation Executed
Unit/Headless/Leak
dotnet test tests/Dock.Model.Avalonia.UnitTests/Dock.Model.Avalonia.UnitTests.csproj -nologo(Passed: 115)dotnet test tests/Dock.Avalonia.HeadlessTests/Dock.Avalonia.HeadlessTests.csproj -nologo(Passed: 512)dotnet test tests/Dock.Avalonia.LeakTests/Dock.Avalonia.LeakTests.csproj -c Release -nologo --filter "FullyQualifiedName~ToolDockItemsSourceLeakTests|FullyQualifiedName~DocumentDockItemsSourceLeakTests"(Passed: 4)dotnet test tests/Dock.Model.UnitTests/Dock.Model.UnitTests.csproj -nologo(Passed: 81)Build
dotnet build Dock.slnx -nologo(Succeeded, warnings only)Notes for Reviewers