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

RadMenuItem foreground color

2 Answers 54 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Ron asked on 28 Jul 2011, 02:04 PM
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 Answers, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 28 Jul 2011, 03:50 PM
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!

0
Ron
Top achievements
Rank 1
answered on 28 Jul 2011, 05:09 PM
Worked like a charm, thank you Dani.
Tags
Menu
Asked by
Ron
Top achievements
Rank 1
Answers by
Dani
Telerik team
Ron
Top achievements
Rank 1
Share this question
or