scrollable wrapped menu

2 posts, 0 answers
  1. troy
    troy avatar
    20 posts
    Member since:
    Jun 2008

    Posted 28 Jul 2010 Link to this post

    I have a menu that has hundreds of submenus and I want to use the RadWrapPanel to display these submenus.  This works fine by create a style to override the ItemsPanelTemplate.  My problem is when the number of items exceeds my max width, I need a scroll bar.  I tried to accomplish this using the style below.  This is problematic b/c it appears to be applying the ScrollViewer to each menuitem and not to the ItemsPanel...  I have tried to figure out how to get to the ControlTemplate of the ItemsPanel but to no avail.  I also edited the style in Blend but  I  can't find anything for the ItemsPanel.

    Any help would be greatly appreciated.


    BTW - I am using the Q2 2010 version of the controls.


    <Style TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="ItemsPanel">
    <!-- set different MaxHeight to control the size of the menu -->
    <telerik:RadWrapPanel Orientation="Vertical" MaxHeight="800" MaxWidth="800" />
    </Setter><Setter Property="Template">


  2. Pana
    Pana avatar
    748 posts

    Posted 02 Aug 2010 Link to this post

    Hello Troy,

    Displaying hundreds of menu items is a terrible user experience. I don't know what is your application logic and how it demands this large menu but in general it would be better to create a custom dialog window that displays the items in ListBox or RadComboBox (note that RadComboBox support filtering and virtualization).

    As control template is not enough. The menu items have more complex ControlTemplate. There are 4 templates for 4 different menu items. First level menu items with sub menu items, first level menu items without sub menu items, sub menu items that do not have further sub menu items and sub menu items with other sub menu items. I would recommend you to open the Input assembly with Reflector it will alow you to see all the resources in the assembly including the office theme for the menu (i think the resource should be something like themes/office/black/menu.xaml) You will see that the ControlTemplate has additional stuff like visual states, presenters for the header, icon, popup with the ItemsPresenter inside. you should put the ItemsPresenter in ScrollViewer like you did but you should also keep all the other stuff in place.

    Kind regards,
    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
Back to Top