Menu Styling Question

2 posts, 0 answers
  1. Scott Michetti
    Scott Michetti avatar
    92 posts
    Member since:
    Feb 2010

    Posted 06 Jul 2010 Link to this post

    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
  2. Pana
    Admin
    Pana avatar
    748 posts

    Posted 12 Jul 2010 Link to this post

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