private void UpdateEnabled(Control c)
{
if (c != null)
{
// Start with the enabled state of the group element
bool enabled = _ribbonNumericUpDown.Enabled;
// If we have an associated designer setup...
if (!_ribbon.InDesignHelperMode && (_ribbonNumericUpDown.NumericUpDownDesigner != null))
{
// And we are not using the design helpers, then use the design specified value
enabled = _ribbonNumericUpDown.NumericUpDownDesigner.DesignEnabled;
}
c.Enabled = enabled;
}
}