ComponentFactory.Krypton.Toolkit.ButtonSpecAny.OnButtonSpecPropertyChanged C# (CSharp) Method

OnButtonSpecPropertyChanged() protected method

Raises the ButtonSpecPropertyChanged event.
protected OnButtonSpecPropertyChanged ( string propertyName ) : void
propertyName string Name of the appearance property that has changed.
return void
        protected override void OnButtonSpecPropertyChanged(string propertyName)
        {
            base.OnButtonSpecPropertyChanged(propertyName);

            if (propertyName == "KryptonCommand")
            {
                if (KryptonCommand != null)
                {
                    if (Checked != ButtonCheckState.NotCheckButton)
                        Checked = (KryptonCommand.Checked ? ButtonCheckState.Checked : ButtonCheckState.Unchecked);

                    Enabled = (KryptonCommand.Enabled ? ButtonEnabled.True : ButtonEnabled.False);
                }
            }
            else if (propertyName == "Checked")
            {
                if (KryptonCommand != null)
                    KryptonCommand.Checked = (Checked == ButtonCheckState.Checked);
            }
        }