Loading...
Loading...
Implements the Syncfusion WPF DockingManager control for Visual Studio-like docking interfaces with MDI/TDI support, floating windows, and auto-hide panels. Use this when creating docking layouts, window management systems, tabbed document interfaces, or IDE-style layouts in WPF applications. Covers dock panels, floating windows, auto-hide functionality, state persistence, and window management.
npx skill4agent add syncfusion/wpf-ui-components-skills syncfusion-wpf-docking<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf">
<Grid>
<syncfusion:DockingManager x:Name="dockingManager"
UseDocumentContainer="True">
<!-- Docked Window - Right Side -->
<ContentControl x:Name="SolutionExplorer"
syncfusion:DockingManager.Header="Solution Explorer"
syncfusion:DockingManager.SideInDockedMode="Right"
syncfusion:DockingManager.DesiredWidthInDockedMode="250">
<TextBlock Text="Solution Explorer Content" />
</ContentControl>
<!-- Auto-Hidden Window -->
<ContentControl x:Name="Toolbox"
syncfusion:DockingManager.Header="Toolbox"
syncfusion:DockingManager.State="AutoHidden">
<TextBlock Text="Toolbox Content" />
</ContentControl>
<!-- Float Window -->
<ContentControl x:Name="Properties"
syncfusion:DockingManager.Header="Properties"
syncfusion:DockingManager.State="Float">
<TextBlock Text="Properties Content" />
</ContentControl>
<!-- Document Window (TDI) -->
<ContentControl x:Name="StartPage"
syncfusion:DockingManager.Header="Start Page"
syncfusion:DockingManager.State="Document">
<TextBlock Text="Document Content" />
</ContentControl>
</syncfusion:DockingManager>
</Grid>
</Window>using Syncfusion.Windows.Tools.Controls;
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
// Create DockingManager
DockingManager dockingManager = new DockingManager();
dockingManager.UseDocumentContainer = true;
// Create windows
ContentControl solutionExplorer = new ContentControl();
ContentControl toolbox = new ContentControl();
ContentControl properties = new ContentControl();
ContentControl startPage = new ContentControl();
// Configure Solution Explorer (Docked Right)
DockingManager.SetHeader(solutionExplorer, "Solution Explorer");
DockingManager.SetSideInDockedMode(solutionExplorer, DockSide.Right);
DockingManager.SetDesiredWidthInDockedMode(solutionExplorer, 250);
// Configure Toolbox (Auto-Hidden)
DockingManager.SetHeader(toolbox, "Toolbox");
DockingManager.SetState(toolbox, DockState.AutoHidden);
// Configure Properties (Float)
DockingManager.SetHeader(properties, "Properties");
DockingManager.SetState(properties, DockState.Float);
// Configure Start Page (Document)
DockingManager.SetHeader(startPage, "Start Page");
DockingManager.SetState(startPage, DockState.Document);
// Add children
dockingManager.Children.Add(solutionExplorer);
dockingManager.Children.Add(toolbox);
dockingManager.Children.Add(properties);
dockingManager.Children.Add(startPage);
this.Content = dockingManager;
}
}<syncfusion:DockingManager x:Name="dockingManager">
<!-- Target Window -->
<ContentControl x:Name="MainPanel"
syncfusion:DockingManager.Header="Main Panel"
syncfusion:DockingManager.SideInDockedMode="Left"/>
<!-- Tabbed with Main Panel -->
<ContentControl syncfusion:DockingManager.Header="Secondary Panel"
syncfusion:DockingManager.SideInDockedMode="Tabbed"
syncfusion:DockingManager.TargetNameInDockedMode="MainPanel"/>
</syncfusion:DockingManager><syncfusion:DockingManager x:Name="dockingManager"
PersistState="True">
<!-- Windows will automatically save/load state -->
</syncfusion:DockingManager>// Save state manually
dockingManager.SaveDockState();
// Load state manually
dockingManager.LoadDockState();<syncfusion:DockingManager UseDocumentContainer="True"
ContainerMode="TDI"
TabGroupEnabled="True">
<ContentControl syncfusion:DockingManager.Header="Document 1"
syncfusion:DockingManager.State="Document"/>
<ContentControl syncfusion:DockingManager.Header="Document 2"
syncfusion:DockingManager.State="Document"/>
</syncfusion:DockingManager>// Create vertical tab group programmatically
(dockingManager.DocContainer as DocumentContainer)
.CreateVerticalTabGroup(document1);<syncfusion:DockingManager UseNativeFloatWindow="True"
ShowFloatWindowInTaskbar="True">
<ContentControl syncfusion:DockingManager.Header="Float Window"
syncfusion:DockingManager.State="Float"
syncfusion:DockingManager.CanFloatMaximize="True"/>
</syncfusion:DockingManager><Window xmlns:syncfusionskin="clr-namespace:Syncfusion.SfSkinManager;assembly=Syncfusion.SfSkinManager.WPF">
<syncfusion:DockingManager
syncfusionskin:SfSkinManager.VisualStyle="VisualStudio2013">
<!-- Windows -->
</syncfusion:DockingManager>
</Window>// Apply theme in code
SfSkinManager.SetVisualStyle(dockingManager, VisualStyles.VisualStudio2013);| Property | Type | Purpose | When to Use |
|---|---|---|---|
| UseDocumentContainer | bool | Enables Document state for windows | When you need MDI/TDI document areas |
| ContainerMode | DocumentContainerMode | Sets MDI or TDI mode | To choose between Multiple Document Interface (MDI) or Tabbed Document Interface (TDI) |
| PersistState | bool | Auto-saves layout on close | When users need to preserve window arrangements between sessions |
| UseNativeFloatWindow | bool | Uses WPF Window for float | For better multi-monitor support and resizing |
| MaximizeButtonEnabled | bool | Shows maximize button on docked windows | When users need to maximize docked panels |
| MinimizeButtonEnabled | bool | Shows minimize button on docked windows | When users need to minimize docked panels |
| TabGroupEnabled | bool | Allows creating horizontal/vertical tab groups | For advanced TDI document grouping |
| IsVS2010DraggingEnabled | bool | Enables VS2010-style dragging | For modern drag behavior where TDI tabs can float |
| Property | Type | Purpose | When to Use |
|---|---|---|---|
| Header | object | Sets window title | Always - required for identifying windows |
| State | DockState | Sets window state (Dock/Float/AutoHidden/Document) | To control initial or runtime window state |
| SideInDockedMode | DockSide | Sets dock position (Left/Right/Top/Bottom/Tabbed) | When docking windows to specific sides |
| TargetNameInDockedMode | string | Specifies target window for relative docking | For tabbed or side-by-side arrangements |
| DesiredWidthInDockedMode | double | Sets width when docked | To control initial size of side-docked windows |
| DesiredHeightInDockedMode | double | Sets height when docked | To control initial size of top/bottom-docked windows |
| CanDock | bool | Enables/disables docking | To restrict certain windows from being docked |
| CanFloat | bool | Enables/disables floating | To restrict certain windows from floating |
| CanClose | bool | Enables/disables closing | To create mandatory windows that can't be closed |
| NoHeader | bool | Hides window header | For embedded content that doesn't need a title bar |
UseDocumentContainer="True"ContainerMode="TDI"PersistStateTabGroupEnabled="True"IsVS2010DraggingEnabledUseNativeFloatWindow="True"ShowFloatWindowInTaskbar="True"PersistState="True"AllowPin="True"ShowPin="True"ContainerMode="MDI"CanClose="False"