ComponentFactory.Krypton.Ribbon.KryptonRibbonGroupCustomControlDesigner.OnVisible C# (CSharp) Method

OnVisible() private method

private OnVisible ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        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);
            }
        }