using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Drawing; namespace HeuristicLab.MainForm.WPF { public abstract class WPFUserInterfaceItem : ActionUserInterfaceItem { private bool isEnabled = true; public bool IsEnabled { get { return isEnabled; } set { if (value == isEnabled) return; isEnabled = value; OnIsEnabledChanged(); } } public event EventHandler IsEnabledChanged; protected void OnIsEnabledChanged() { EventHandler handler = IsEnabledChanged; if (handler != null) handler(this, EventArgs.Empty); } } }