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