)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the appearance of the Dockable controls?

Platform: WinForms |
Control: DockingManager |
Published Date: March 11, 2015 |
Last Revised Date: May 23, 2019

In DockingManager, you can customize the appearance of the dockable control by handling the ProvideGraphicsItems event.

The following code example is to demonstrate the same.

C#

//To paint dockable control's caption
this.dockingManager1.ProvideGraphicsItems += new Syncfusion.Windows.Forms.Tools.ProvideGraphicsItemsEventHandler(this.dockingManager1_ProvideGraphicsItems);
private void dockingManager1_ProvideGraphicsItems(object sender, Syncfusion.Windows.Forms.Tools.ProvideGraphicsItemsEventArgs arg)
{
//To set the back color of the dock caption
arg.CaptionBackground = Brushes.Pink;
//To set the caption font
arg.CaptionFont = new Font(this.Font.FontFamily, 11, FontStyle.Underline);
//To set the caption fore color
arg.CaptionForeground = Color.Blue;
//To set the caption back color
arg.Control.BackColor = Color.White;
}

VB

'To paint dockable control's caption
AddHandler dockingManager1.ProvideGraphicsItems, AddressOf dockingManager1_ProvideGraphicsItems
Private Sub dockingManager1_ProvideGraphicsItems(ByVal sender As Object, ByVal arg As Syncfusion.Windows.Forms.Tools.ProvideGraphicsItemsEventArgs)
'To set the back color of the dock caption
arg.CaptionBackground = Brushes.Pink
'To set the caption font
arg.CaptionFont = New Font(Me.Font.FontFamily, 11, FontStyle.Underline)
'To set the caption fore color
arg.CaptionForeground = Color.Blue
'To set the caption back color
arg.Control.BackColor = Color.White
End Sub

The following screenshot illustrates the output.

Showing customized DockingManager

Figure 1: Customized DockingManager

Sample:

http://www.syncfusion.com/downloads/support/directtrac/general/DockingManager-1692503252.zip

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon