Please help, to C1dockingtab set header color

Posted by: eploentham on 21 April 2019, 8:09 pm EST

    • Post Options:
    • Link

    Posted 21 April 2019, 8:09 pm EST - Updated 4 October 2022, 1:18 am EST

    please suggest me to set header color tab page

    thank you

  • Posted 22 April 2019, 4:32 am EST

    Hello,

    C1DockingTab tab headers’ color can be set using themes. You can create themes using C1ThemeDesigner and set the properties to set color for header captions. Use the Background property under C1Command\C1DockingTab\Caption\Active.

    You can learn more about creating a custom theme from the below mentioned documentation link:

    https://help.grapecity.com/componentone/NetHelp/c1themes/webframe.html#QSCreatingaCustomTheme.html

    Best Regards,

    Esha

    prj_C1DockingTab_TabBackColor_Theme.zip

  • Posted 8 January 2025, 2:06 pm EST

    When i use the theme i can’t change the tabstyle to rounded!

  • Posted 9 January 2025, 4:49 am EST

    Hi j.geier,

    if you don’t use themes, you can simply use this code snippet:

    this.c1DockingTabPage2.TabBackColor = Color.Green;
    this.c1DockingTabPage2.TabForeColor = Color.Yellow;

    See attached sample (C# and .NET8).

    TabBackColor.zip

    Hope this helps

    Wolfgang

  • Posted 9 January 2025, 4:55 am EST

    Hello,

    After applying a C1Theme, the values defined in the theme take precedence, so modifying the ‘TabStyle’ through code will not work directly. Instead, you need to update the property within the theme itself. To set the ‘TabStyle’ to “Rounded,” modify the applied theme’s C1Command\C1DockingTab\Tabs\TabStyle property to “Rounded.”

    Furthermore, you can also change the theme property via code as follows:

    private bool SetTabStyleProperty(C1Theme theme, string propPath, TabStyle style)
    {
        if (theme != null)
        {
            // Get the style property at the specified path.
            var prop = (EnumProp<TabStyle>)theme.Children.GetItemByPath(propPath);
            prop.Value = style;
            return true;
        }
        return false;
    }

    Please refer to the modified sample. (See prj_C1DockngTab_Mod.zip)

    Regards,

    Uttkarsh.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels