2
Vote

Infinite loop when showing a RibbonTab with one or more nonvisible panels

description

Hi,

I just run into this issue. I have a contextual RibbonTab and I reconfigure it (hiding/showing panels) just before setting RibbonTab.Context.Visible to true. The code runs into an infinite loop when trying to resize the panels to fit in its tab.

I could break the infinite loop with the following modifications in RibbonTab.cs file:

private bool AllPanelsOverflow()
{
foreach (RibbonPanel panel in Panels)
{
    if (panel.Visible && panel.SizeMode != RibbonElementSizeMode.Overflow)
    {
        return false;
    }
}
return true;
}

comments