ComponentFactory.Krypton.Ribbon.KryptonRibbonGroupRichTextBoxDesigner.OnEnabled C# (CSharp) Method

OnEnabled() private method

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