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