Category / Section
How to float the DockingChildren in the ShadowDraggingMode?
1 min read
Docking children can be floated in the ShadowDragging mode. In order to achieve this, set the value as ShadowDragging for the DraggingType property. The following codes demonstrate how to use the DraggingType property in the DockingManager.
XAML
<Window x:Class="Docking_ShadowDragging.MainWindow" 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" Title="MainWindow" Height="350" Width="525"> <Grid x:Name="Grid1"> <syncfusion:DockingManager x:Name="DockingManager1" DraggingType="ShadowDragging" > <ContentControl Name="Content1" syncfusion:DockingManager.Header="Dock1" ></ContentControl> <ContentControl Name="Content2" syncfusion:DockingManager.Header="Dock2"></ContentControl> <ContentControl Name="Content3" syncfusion:DockingManager.Header="Dock3"></ContentControl> </syncfusion:DockingManager> </Grid> </Window>
C#
using Syncfusion.Windows.Tools.Controls; namespace Docking_ShadowDragging { /// <summary> /// Interaction logic for MainWindow.xaml. /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); DockingManager DockingManager1 = new DockingManager(); ContentControl content1 = new ContentControl(); ContentControl content2 = new ContentControl(); ContentControl content3 = new ContentControl(); DockingManager.SetHeader(content1, "Dock1"); DockingManager.SetHeader(content2, "Dock2"); DockingManager.SetHeader(content3, "Dock3"); DockingManager1.DraggingType = DraggingType.ShadowDragging; DockingManager1.Children.Add(content1); DockingManager1.Children.Add(content2); DockingManager1.Children.Add(content3); Grid1.Children.Add(DockingManager1); } } }
The following screenshot shows how the shadow of the Dockingchildren can be floated.