Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to draw the DockPanel Tab header with a custom Color when Skin is used

$
0
0

The How to implement the custom draw functionality for skinned dock panels example illustrates the most common approach to implement this functionality by raising a custom CustomDrawDockPanelCaption event.

The current example illustrates an alternative approach that allows you to change the dock panel appearance by creating a custom paint style.

To change an active panel tab header appearance, you can create your own SkinBarManagerPaintStyle and override DrawActiveTab in the corresponding DockElementsSkinPainter descendant.

Question Comments

Added By: sivasubramanian at: 11/27/2013 10:16:05 PM    

Please attach the Runnable Sample ASAP. Some code snippets are missing in the below Files.

Added By: Wolfgang Wallhäuser at: 1/29/2015 12:52:16 AM    

For tabbed dock panels, I want to have different text colors on the tab buttons.

Using the sample code, I can change the text color of the selected tab:

     protected override void DrawActiveTab(DrawTabArgs tabArgs)
     {
        tabArgs.Appearance.ForeColor = Color.White;
        base.DrawActiveTab(tabArgs);
     }

By overriding DrawTabPanel, I can change the text color of the other tabs as well:

     public override void DrawTabPanel(DrawTabPanelArgs args)
     {
        args.Appearance.ForeColor = Color.Pink;
        base.DrawTabPanel(args);
     }

But I do not know how to change the text color of a "hot tracked" tab button. Can this be achieved by extending this code?

Added By: Alexey Z (DevExpress Support) at: 1/29/2015 2:01:57 AM    Hello,

In order not to mix several questions within one thread, I will extract your question to a new ticket. Let us continue our discussion there DockPanels - How to change the text color of a "hot tracked" tab button.

Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>