RadPane Header Foreground in Metro theme

7 posts, 0 answers
  1. Murray
    Murray avatar
    121 posts
    Member since:
    Aug 2010

    Posted 14 Feb 2012 Link to this post

    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
  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 20 Feb 2012 Link to this post

    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 >>
  3. DevCraft banner
  4. Murray
    Murray avatar
    121 posts
    Member since:
    Aug 2010

    Posted 20 Feb 2012 Link to this post

    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
  5. Murray
    Murray avatar
    121 posts
    Member since:
    Aug 2010

    Posted 20 Feb 2012 Link to this post

    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".



  6. Dani
    Admin
    Dani avatar
    848 posts

    Posted 22 Feb 2012 Link to this post

    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 >>
  7. Murray
    Murray avatar
    121 posts
    Member since:
    Aug 2010

    Posted 22 Feb 2012 Link to this post

    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.
  8. Dani
    Admin
    Dani avatar
    848 posts

    Posted 24 Feb 2012 Link to this post

    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 >>
Back to Top
DevCraft banner