RibbonTabItem - Groups.Clear() not working

May 15, 2011 at 10:46 PM
Edited May 16, 2011 at 1:18 AM

To resolve, I have to loop through each element and do a RemoveAt for each element!

It sure would be nice if we could use the Clear() functionality of the OverservableCollection<RibbonGroupBox> function OnGroupsCollectionChanged.

I have tried to put in another case NotifyCollectionChangedAction.Reset, but I couldn't get it to work!

I have a RibbonTabItem that is totally dynamic based on my MVVM setup, hence the need for the mass clear functionality!

May 19, 2011 at 6:58 AM

I just noticed that the same happens for Ribbon.Tabs.Clear() - the debugger shows that the Tabs collection is empty, but in the GUI, the ribbon still shows the removed tabs.