<syncfusion:DockingManager x:Name="dManager" UseDocumentContainer="True" UseNativeFloatWindow="True">
<ContentControl x:Name="SolutionExplorer" syncfusion:DockingManager.Header="Solution Explorer" />
<ContentControl x:Name="ToolBox" syncfusion:DockingManager.Header="Toolbox" syncfusion:DockingManager.State="Float" syncfusion:DockingManager.FloatingWindowRect="100 100 100 100" />
<ContentControl x:Name="Properties" syncfusion:DockingManager.Header="Properties" syncfusion:DockingManager.DesiredMinWidthInFloatingMode="120" syncfusion:DockingManager.SizetoContentInDock="True">
<Grid Background="Orange" Height="100" Width="120"> </Grid>
</ContentControl>
<ContentControl x:Name="Output" syncfusion:DockingManager.Header="Output"/>
<ContentControl x:Name="StartPage" syncfusion:DockingManager.Header="Start Page" syncfusion:DockingManager.State="Document" />
</syncfusion:DockingManager> |
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Loaded += MainWindow_Loaded;
dManager.Loaded += DManager_Loaded;
dManager.WindowResizing += DManager_WindowResizing;
}
private void DManager_WindowResizing(object sender, WindowResizingEventArgs e)
{
if((sender is NativeFloatWindow))
{
NativeFloatWindow window = sender as NativeFloatWindow;
window.MinWidth = DockingManager.GetDesiredMinWidthInFloatingMode(window.PrimaryElement);
window.MinHeight = DockingManager.GetDesiredMinWidthInFloatingMode(window.PrimaryElement);
}
}
private void DManager_Loaded(object sender, RoutedEventArgs e)
{
foreach(Window win in Application.Current.Windows)
{
if (win is NativeFloatWindow)
{
win.Owner = this;
}
}
}
} |