Hello.
I'm using a MenuTool with ~10k items and have a performance issue when I click the button for the first time. It takes several minutes until the popup is shown.
What I found out so far is that the most cpu time is used in the MenuToolPanel.MeasureOverride method. It seams to me that the MenuToolPanel doesn't support virtualization and hence renders all items in the initial MeasureOverride call.
Is it possible to enable virtualization for the MenuTool?
Or do I have to change the ItemsPresenter in the Popup style against e.g. VirtualizingStackPanel?
Regards,
Darius
Hello Darius,
Thank you for your post.
I have logged this behavior with our developers in our tracking system, with an issue ID of 211266. I have also created a support ticket on your behalf with number CAS-167762-R7T2K9 in order to link the development issue to it so that you are automatically updated when a Service Release containing your fix is available for download.
Thank you.
Thank you for your feedback.
I am really glad, I could help out. Please leave this ticket open in order to be able to receive a notification when the SR containing the fix about copying/binding of CanContentScroll is available for downloading.
Thank you for using Infragistics Components!
It works like a charm.
Best,
Hello Zhivko,
thank you. I'll check your solution as soon as I can.
Thank you for your patience during the investigation for your issue.
After the development team researched your issue with ID of 211266 they reached the conclusion that the issue is based on the current implementation of MenuTool that you are using. You can observe the same behavior if you are using the WPF Menu/MenuItem. If you want the drop down to virtualize the items, you need to do three things:
For example:
<igRibbon:MenuTool
Caption="Items"
ItemsSource="{Binding Items}"
ButtonType="DropDown"
ScrollViewer.CanContentScroll="True">
<igRibbon:MenuTool.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel
MaxHeight="1000" />
</ItemsPanelTemplate>
</igRibbon:MenuTool.ItemsPanel>
</igRibbon:MenuTool>
During the investigation for your issue our development team found an issue with copying and binding of CanContentScroll of MenuToolPresenter to the CanContentScroll of the MenuTool . This issue has been fixed and it will be available in the upcoming Service Release.
What I can suggest in order to avoid the behavior about copying/binding is to create a style for MenuToolPresenter and set the property on that .
<igRibbon:XamRibbon.Resources>
<Style TargetType="{x:TypeigRibbon:MenuToolPresenter}">
<Setter
Property="ScrollViewer.CanContentScroll"
Value="True" />
</Style>
</igRibbon:XamRibbon.Resources>
I have modified the sample application in order to show you how you can implement this approach.
Note: Please leave this case open in order to be able to receive a notification when the SR containing the fix about copying/binding of CanContentScroll is available for downloading.