Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
142524 | Feb 7,2019 03:44 PM UTC | Feb 13,2019 09:47 AM UTC | WPF | 6 |
![]() |
Tags: DockingManager |
<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;
}
}
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.