private void OnEnabled(object sender, EventArgs e)
{
if ((_ribbonRichTextBox != null) && (_ribbonRichTextBox.Ribbon != null))
{
PropertyDescriptor propertyEnabled = TypeDescriptor.GetProperties(_ribbonRichTextBox)["Enabled"];
bool oldValue = (bool)propertyEnabled.GetValue(_ribbonRichTextBox);
bool newValue = !oldValue;
_changeService.OnComponentChanged(_ribbonRichTextBox, null, oldValue, newValue);
propertyEnabled.SetValue(_ribbonRichTextBox, newValue);
}
}