RadMenuItem foreground color

3 posts, 0 answers
  1. Ron
    Ron avatar
    9 posts
    Member since:
    Jul 2011

    Posted 28 Jul 2011 Link to this post

    I have a RadMenu where I want the TopLevelItem to be a different color than the SubMenuItems. How would I achieve this, given the fact that the ContentPresenter does not have a Foreground property?

    I have created a custom skin, so I have access to the TopLevelItemTemplate and the SubMenuItemTemplate, but can't find a place where I can set the Foreground differently on each of those. I seem to only be able to set it implicitly on RadMenuItem, but then the color is always the same no matter which level it is at.

    Thanks,
    Ron
  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 28 Jul 2011 Link to this post

    Hi Ron,

    As you are already using the needed resources for customizing the RadMenuItem, what you can do to change the Foreground in the different templates is the following:  replace the ContentPresenter with a ContentControl and set the Foreground property to that ContentControl.

    I hope this helps.

    Regards,
    Dani
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. DevCraft banner
  4. Ron
    Ron avatar
    9 posts
    Member since:
    Jul 2011

    Posted 28 Jul 2011 Link to this post

    Worked like a charm, thank you Dani.
Back to Top