public override void Layout(ViewLayoutContext context)
{
// Prevent reentrancy
if (!_layingOut)
{
Form ownerForm = _ribbon.FindForm();
// We do not need to layout if inside a control that is minimized or if we are not inside a form at all
if ((ownerForm == null) || ((ownerForm != null) && (ownerForm.WindowState == FormWindowState.Minimized)))
return;
_layingOut = true;
// Update the calculate values used during layout calls
_ribbon.CalculatedValues.Recalculate();
// Let base class perform standard layout actions
base.Layout(context);
_layingOut = false;
}
}