This is a migrated thread and some comments may be shown as answers.

RadPane Header Foreground in Metro theme

6 Answers 164 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Murray
Top achievements
Rank 2
Murray asked on 14 Feb 2012, 02:26 PM
Hi

We are using the Metro theme and I am unable to fix the foreground color of the RadPaneHeader. I have used the template that comes with your source files but nothing seems to work.

How do I set the PaneHeaders text and buttons (pin, close etc) to "MarkerBrush"? Right now it seems to be using the MainBrush which is really hard to read when using these palletes

MetroColors.PaletteInstance.MainColor = Color.FromArgb(255, 51, 51, 51);
MetroColors.PaletteInstance.AccentColor = Color.FromArgb(255, 66, 66, 66);
MetroColors.PaletteInstance.BasicColor = Colors.DarkGray;
MetroColors.PaletteInstance.StrongColor = Colors.White;
MetroColors.PaletteInstance.MarkerColor = Colors.LightGray;
MetroColors.PaletteInstance.ValidationColor = Colors.Red;
 
StyleManager.ApplicationTheme = new MetroTheme();

Regards
Murray

6 Answers, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 20 Feb 2012, 10:31 AM
Hello Murray,

We apologize for the delayed reply.

To change the foreground of the PaneHeader, you will need to edit the PaneHeader style for the Metro theme, because its foreground is hardcoded in the style. The PaneHeader is part of the PaneGroup template, so you should start off by editing the PaneGroupStyle and then drill down to the style of the PaneHeader.

Changing the metro colors as mentioned in your post and as suggested in this blog post is only applicable if you wish to change a metro brush globally. Changing the foreground of the PaneHeader is a customization for which changing metro colors in the code-behind is not suitable. It requires you to edit the PaneHeader style.

I hope this will be helpful. Let me know if you need further assistance on this issue.


All the best,
Dani
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Murray
Top achievements
Rank 2
answered on 20 Feb 2012, 10:15 PM
Hi and thank you for your response Dani

Unfortunately I've had no luck. I did find the Header background color in the template (though I didnt need to change this) but not the foreground (the foreground right nect to the background which did work had no effect).

Could you send me a Metro Docking Resource file with the foreground of the Header text, Pin, Close and DropDown set to MarkerBrush?
If you could comment where these areas are that would really help in the future.

Thanks so much
Murray
0
Murray
Top achievements
Rank 2
answered on 20 Feb 2012, 10:29 PM
Oh and I can't use the designer in Blend 5 for your Docking Resource files as I get the errors:

The local property "Header" can only be applied to types that are derived from "HeaderedItemsControl".
The local property "ItemsTemplateSelector" can only be applied to types that are derived from "ItemsControl".
The local property "TabStripPlacement" can only be applied to types that are derived from "RadTabControlBase".
The local property "BackgroundVisibility" can only be applied to types that are derived from "RadTabControlBase".
The local property "TabOrientation" can only be applied to types that are derived from "RadTabControlBase".



0
Dani
Telerik team
answered on 22 Feb 2012, 11:14 AM
Hello Murray,

Please, find attached a sample project illustrating how PaneHeader foreground value can be changed for the Metro theme. You can search for "NOTE" to check the comments of the modified spots. I hope this will be helpful.

By Expression Blend 5 I suppose you mean the Expression Blend Preview for Silverlight 5. The attached project is tested as both a Silverlight 4 and a Silverlight 5 project and we were unable to reproduce the exceptions you mention.

If you are still experiencing troubles with the those exceptions, please send us a sample reproducing this behavior so that we can test and identify the issues.


All the best,
Dani
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Murray
Top achievements
Rank 2
answered on 22 Feb 2012, 11:47 AM
Thank you so much for your time Dani!

I feel like a complete idiot as one of my developers had applied the theme inline on the actual pane which over-rode what I was trying to set in the ResourceDictionary. No wonder everything I tried didn't work!

Thanks again and it never ceases to amaze my the high level of support the Telerik team gives it's customers!


And as to the error, I've seen something like this before and may be a mismatch in some dll's somewhere? I'll look into it and if continues I'll submit a ticket.
0
Dani
Telerik team
answered on 24 Feb 2012, 09:36 AM
Hello Murray,

On the issue with the Expression Blend errors, I agree that such exceptions may be thrown if there are discrepancies in dll versions. Or even if the assemblies have been built against a different version of the target framework than the project target framework.

I hope the issue will be resolved with ease. Of course, if you experience difficulties, feel free to submit a support ticket with your request.

Regards,
Dani
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Docking
Asked by
Murray
Top achievements
Rank 2
Answers by
Dani
Telerik team
Murray
Top achievements
Rank 2
Share this question
or