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

RadMenu - Possible to pre-render the results?

4 Answers 50 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 20 Sep 2010, 09:34 PM
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.

4 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 21 Sep 2010, 08:39 AM
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
0
Rob
Top achievements
Rank 1
answered on 21 Sep 2010, 01:53 PM
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...

0
Hristo
Telerik team
answered on 21 Sep 2010, 01:57 PM
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
0
Rob
Top achievements
Rank 1
answered on 22 Sep 2010, 05:09 PM
Sure Hristo.  The ticket number is 350682.  I attached a sample project as well.
Tags
Menu
Asked by
Rob
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Rob
Top achievements
Rank 1
Share this question
or