RadMenu - Possible to pre-render the results?

5 posts, 0 answers
  1. Rob
    Rob avatar
    238 posts
    Member since:
    Jan 2009

    Posted 20 Sep 2010 Link to this post

    Hello,

    I am attempting to use a RadMenu in my application that is backed by a datamodel (which will be manipulated by our clients on the front end).  To give you an idea of the size of the menu, it should start our relatively small.  A "large" menu would have at most 5 TopLevel items.  Each of those TopLevel items might have approximately 10 subitems.  Some (maybe one-third) of those subitems will have a handful of children as well.  It is client customizable, so it's hard to be sure but in our test environments, it's fair to say there is on the order of 100-ish total RadMenuItem's in the menu...

    My problem is that when you hover (or click) one of the TopLevel items, the gui will not show the menu (most of the time).  The creation of the objects has occurred and they exist but are not displayed.  As you move your mouse to where the menu items should be displayed, they show up.  If you close that node and come back afterwards it is displayed perfectly.

    We are using several variations of this menu but they are all linked to bound collections and using either static item templates or item template selectors.  Also we are using several container bindings to control properties like "Icon", "IsEnabled", "Command", etc...

    Basically what I'm trying to say is.... the more we add, the slower it gets.

    1) Has anybody else seen this behavior and are there ways to overcome it?

    2) Does anybody know if it would be faster if I built RadMenuItem's directly in the code and then simply attached them to the menu at runtime so that all the template selectors and converters don't need to fire on mouseover? (not my preference)
    3) Or is there a way to pre-render the menuitems once the DataContext is assigned so that I can avoid having to do it as the user requests the menu.

  2. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 21 Sep 2010 Link to this post

    Hello Rob,

    Technically it is possible to virtualize RadMenuItems so they will load faster. But from UX point I'm not sure how usable it will be to have 100 subItems.

    I've attached sample project with modified RadMenuItem templates that includes custom scroll and item virtualization. There are 5 top level items each with 100 sub items and each of them with 100 sub items (3 level deep menu). There is also RadContextMenu which is also virtualized. (this is Silverlight 4 project with 2010.Q2.SP1 trail assemblies).

    I hope that this example will be helpful.
    Let us know if you need more information.

    Regards,
    Hristo
    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
  4. Rob
    Rob avatar
    238 posts
    Member since:
    Jan 2009

    Posted 21 Sep 2010 Link to this post

    I think I've maybe not explained myself very well.  (Although the scrolling panel is pretty cool and I will use it somewhere)...

    I've attached a picture showing what I mean.  The problem isn't whether or not the items will fit on the screen, but more that they are not displayed at all.  Then if you hover where the item "should" be it will show up, or if you close the menu and open it again it will show up...

    In this particular scenario, I use a template selector to pick the display format of each item (either the light blue headers, or the two line items) and a style selector since they both have different styles as well as some container binding to bind different properties and some converters to set the isenabled property based whether or not the item is a header...  It just seems to randomly choke while rendering the items...

  5. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 21 Sep 2010 Link to this post

    Hello Rob,

    I have not seen this behavior. Could you open a support ticket and attach sample project so that I can investigate it?

    Sincerely yours,
    Hristo
    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
  6. Rob
    Rob avatar
    238 posts
    Member since:
    Jan 2009

    Posted 22 Sep 2010 Link to this post

    Sure Hristo.  The ticket number is 350682.  I attached a sample project as well.
Back to Top
DevCraft banner