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. Image for the cookie policy date

DockingManager and Appearance-Caption

Hi everybody,

I figured that the "Appearance-Caption" related properties are what I need in order to control the docking-panels' caption colors.

I tried to play arround with the SimpleDocking sample, but these properties seem to have no effect.

Does anyone know what is recquired for them to take effect, or if there's another way of controlling the docking-panels' caption colors and style ?


Thanks in advance.

6 Replies

AD Administrator Syncfusion Team February 15, 2007 03:23 PM UTC

Another question.

Is there a way to apply DockToFill just to the remaining space rather than the entire DockingManager rectangle ?


MU Murugan Syncfusion Team February 15, 2007 11:06 PM UTC

Hi Ryon,

We are really sorry to say that currently we could not change the CaptionBar colors. We already logged feature request in this regard. The feature will be implemented within June 2007.

Here is the feature request link

Feature Request #1243 - Need a provision to set user defined color for captionbar when VisualStyle is OfficeXP/2003/2007 etc

DockToFill only works with the overall Form rectangle. We could not change the behavior as you mentioned. It is an internal behavior of DockingManager.

Thanks for using Syncfusion products.

Regards,
Murugan P.S


YU Yuriy February 16, 2007 11:52 AM UTC

Hi Ryan,

While feature haven't been implemented you can use ProvideGraphicsItems event.

Here is the sample with highligting active control's caption.

private void dockingManager1_ProvideGraphicsItems(object sender, Syncfusion.Windows.Forms.Tools.ProvideGraphicsItemsEventArgs arg)
{
if (arg.IsActiveCaption)
{
arg.CaptionBackground = Brushes.LightBlue;
arg.CaptionFont = new Font("Tahoma", 10f, FontStyle.Italic);
}
}

Thanks, Yuriy


AD Administrator Syncfusion Team February 17, 2007 05:41 PM UTC

Thanks Yuriy.

using ProvideGraphicsItems didn't seem to have any effect.

I did notice that setting VisualStyle to "Default" enables me to set ActiveCaptionBackground.Style to "Gradient" and ActiveCaptionBackground.GradientStyle to whatever GradientStyle I desire in the property grid at runtime - and it does produce the desired effect, but both properties appear to be readonly when I try to apply the changes programatically.
What does it mean and how do I work my way arround this problem ?


YU Yuriy February 19, 2007 11:36 AM UTC

Hi Ryan,

Yes, the properties you are talking about does not work now.

But try to manipulate programmatically with arg variable in ProvideGraphicsItems event. I checked it myself and it works fine.

To make backgroud of docked controls painted with red color you simply need to set
arg.CaptionBackground = Brushes.Red;
in ProvideGraphicsItems event.

Thanks, Yuriy


AD Administrator Syncfusion Team February 20, 2007 09:46 AM UTC

That doesn't work either, but I found out it's possible by creating a new instance of the (Active/Inactive)CaptionBackground

Loader.
Live Chat Icon For mobile
Up arrow icon