Changing the DockHost TitleBar Color

Good day,

1. I am using the Docking Manager to show multiple forms and am also using a custom color manager.

Most of the colors works fine but i have an issue in that the DockHost's (Syncfusion.Windows.Forms.Tools.DockHost)
Title bar doesn't seem to change and I cannot access any color settings except Back and Fore colors.

2. I am also having an issue correctly coloring the RibbonPanel. I am not actively trying to fix this now but I am unsure if the two might be linked.



For your information I have a set of three colors:
ForeColor: 224,224,224 in this case
BackColor: 27,27,27 in this case
AlternateBackColor: BackColor+10%

My custom color scheme works as follows: (This is NOT used for the RibbonPanel)
<Code>
        public static void SetColors(Control ControlToSet)
        {
            try
            {
                Color ForeColor= App.AppSettings.ForeColor;
                Color BackColor = App.AppSettings.BackColor;
                Color BackAlternativeColor = App.AppSettings.BackColorAlternativeRows;

                ControlToSet.BackColor = BackColor;
                ControlToSet.ForeColor = ForeColor;

               //...Custom code for specific tyes of controls
               //...
               //...

               foreach (Control childControl in ControlToSet.Controls)
                {
                    SetColors(childControl);
                }

            }
            catch(Exception ex)
            {
                LogError.Error(ex);
            }
        }
<?Code>

Regards,
James

3 Replies

MK Mallika Kannan Syncfusion Team December 22, 2017 04:21 PM UTC

Hi James 
 
Thank you for contacting Syncfusion support. 
 
At present Syncfusion DockingManager control customized the below DockHost CaptionBar color. 
 
  1. ActiveDockCaptionForeColor,
  2. ActiveDockCaptionBackColor
  3. InActiveDockCaptionForeColor.
 
This customization is achieved using the below Code Example. 
 
Code Example: [C#] 
 
//InActiveCaptionForeColor 
                                     
this.dockingManager1.MetroInactiveCaptionColor = Color.HotPink; 
                                     
//ActiveCaptionBackColor 
                                     
this.dockingManager1.MetroColor = Color.Red; 
 
 
 
We have also prepared the sample for your reference. It can be downloaded from the below link, 
 
 
Please try this above solution and confirm us this is your reported requirement? We hope you want DockHost CaptionBar customization in more cases. Can you please share your DockHost CaptionBar Customization details? that will helpful for us to provide the solution as earlier. 
 
Regards, 
Mallika 
 
 
 
 
 
 



JR James Roodt January 2, 2018 05:44 AM UTC

Hi Mallika,

This is perfect for the controls which has focus.

However i still have the same issue with the controls which don't have focus as can be seen below where I highlighted the needed controls in yellow.
These are the inactive controls and although the fore color is set the back color doesn't change.
Does it inherit from the parent control?



I implemented your code as follows:





MK Mallika Kannan Syncfusion Team January 3, 2018 11:07 AM UTC

 Hi James 
 
A support incident has been created under your account to track the status of the reported scenario in DockingManager.    
     
Please log on to our support website to check for further updates     
     
     
Regards,     
Mallika 


Loader.
Up arrow icon