Category / Section
How to customize the float window's height and width in DockingManager?
1 min read
In DockingManager, you can set the desired height and width for the Float window using DesirdedHeightInFloatingMode and DesirdedWidthInFloatingMode. The same has been demonstrated using the following code example.
XAML
//The following code shows how to set the DesiredHeightInFloatingMode and DesiredWidthInFloatingMode property for the DockingManager. <Window x:Class="DockingManager_ActivatedEvent.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> <syncfusion:DockingManager > <ContentControl Name="Dock1" syncfusion:DockingManager.Header="Tab1”" syncfusion:DockingManager.DesiredHeightInFloatingMode="250" syncfusion:DockingManager.DesiredWidthInFloatingMode="250" > </ContentControl> </syncfusion:DockingManager> </Grid> </Window>
C#
//The following code shows how to set the DesiredHeightInFloatingMode and DesiredWidthInFloatingMode property for the DockingManager. using Syncfusion.Windows.Tools.Controls; namespace Dockable_Property { /// <summary> /// Interaction logic for MainWindow.xaml. /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); //This code explains how to set the DockingManager.SetDesiredWidthInFloatingMode(Dock1, 250); DockingManager.SetDesiredHeightInFloatingMode(Dock1, 250); } } }
Output
The following screenshot shows how the desired height and width for the floating window is applied in DockingManager.
Figure 1: Output