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