Category / Section
How to set border thickness for the element in WPF DockingManager?
2 mins read
To set the border thickness for the element present inside the WPF DockingManager, ElementBorderThickness property can be used. The same has been demonstrated in the following code example:
XAML
<Window x:Class="NewText_WPfapplication.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="_DockingNew" ElementBorderThickness="5"> <ContentControl syncfusion:DockingManager.Header="Child1" syncfusion:DockingManager.State="Dock"/> <ContentControl syncfusion:DockingManager.Header="Child2" syncfusion:DockingManager.State="Dock"/> <ContentControl syncfusion:DockingManager.Header="Child3" syncfusion:DockingManager.State="Dock"/> <ContentControl syncfusion:DockingManager.Header="Child4" syncfusion:DockingManager.State="Dock"/> <ContentControl syncfusion:DockingManager.Header="Child5" syncfusion:DockingManager.State="Dock"/> </syncfusion:DockingManager> </Grid> </Window>
C#
using Syncfusion.Windows.Tools.Controls; using Syncfusion.Windows.Shared; namespace NewText_WPfapplication { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); DockingManager _Dockingnew = new DockingManager(); _Dockingnew.ElementBorderThickness = new Thickness(5); ContentControl content = new ContentControl(); DockingManager.SetHeader(content, "Child1"); DockingManager.SetState(content, DockState.Dock); ContentControl content1 = new ContentControl(); DockingManager.SetHeader(content1, "Child2"); DockingManager.SetState(content1, DockState.Dock); ContentControl content2 = new ContentControl(); DockingManager.SetHeader(content2, "Child3"); DockingManager.SetState(content2, DockState.Dock); ContentControl content3 = new ContentControl(); DockingManager.SetHeader(content3, "Child4"); DockingManager.SetState(content3, DockState.Dock); ContentControl content4 = new ContentControl(); DockingManager.SetHeader(content4, "Child5"); DockingManager.SetState(content4, DockState.Dock); _Dockingnew.Children.Add(content); _Dockingnew.Children.Add(content1); _Dockingnew.Children.Add(content2); _Dockingnew.Children.Add(content3); _Dockingnew.Children.Add(content4); Grid1.Children.Add(_Dockingnew); } } }
Conclusion
I hope you enjoyed learning about how to set border thickness for the element of WPF DockingManager.
You
can refer to our WPF DockingManager feature tour page to know about
its other groundbreaking feature representations. You can also explore our WPF DockingManager documentation to understand how
to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!