Articles in this section
Category / Section

How to set border thickness for the element of WPF DockingManager?

1 min 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);
      }
   }
}

 

Changing border thickness of WPF DockingManager

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied