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

OnVisible() private method

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