The sample code below adds a Name/Value collection of 10 items (a most recently used list) to the XamRibbon's application menu's recently used list. After running this code a dozen times, the time to complete the line
PentaRibbon.ApplicationMenu.RecentItems.Add(buttonTool);
increases to about 1/2 second per call. Is there any know bug with this?
private void UpdateMRUList() { PentaRibbon.ApplicationMenu.RecentItems.Clear(); foreach (ExtendedProperty extendedProperty in _mruList.Screens) { ButtonTool buttonTool = new ButtonTool(); buttonTool.Click += new RoutedEventHandler(buttonTool_Click); buttonTool.Caption = extendedProperty.Name; buttonTool.Tag = extendedProperty.Value; PentaRibbon.ApplicationMenu.RecentItems.Add(buttonTool); } }
I'm not aware of any issues related to what you describe. If you can provide a sample that demonstrates the issue we can look into the matter to determine what is going on. One thing that you can do to help isolate the issue is to set VS to break on all exceptions and see if you are getting any exceptions during that processing.