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

Menu Styling Question

1 Answer 57 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Scott Michetti
Top achievements
Rank 1
Scott Michetti asked on 06 Jul 2010, 06:46 PM
Hello, I'm using Q1 2010 version for Silverlight 3. I like the styling of the toolbar in your latest demo for silverlight 4.
http://demos.telerik.com/silverlight/
I'd like to style my silverlight 3 menu just like the toolbar in your latest demo. Can you point me in the right direction for this?

Thanks
Scott

1 Answer, 1 is accepted

Sort by
0
Pana
Telerik team
answered on 12 Jul 2010, 06:27 AM
Hi Scott Michetti,

The menu in the demo uses MVVM approach. There is an underlying data that have the menu text strings, image links etc. For each RadMenuItem in the RadMenu there is a custom ControlTemplate - one for the image buttons, one for the headers, one for the link button etc.

Important part in the whole thing is the ItemContainerStyleSelector of the RadMenu. It will pick a custom style for each RadMenuItem based on the view model data provided for it. For example if the MenuItemViewModel's Type is Title the style selector will pick the MenuItemTitleStyle for the RadMenuItem.

If you want to create custom toolbar menu you would probably have to create several custom ControlTemplates and Styles for the RadMenuItems and apply them through custom StyleSelector.

I would recommend you to download the examples code and go through the code for the Customization example.

Greetings,
Panayot
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Menu
Asked by
Scott Michetti
Top achievements
Rank 1
Answers by
Pana
Telerik team
Share this question
or