protected virtual void OnDockStateChanged(EventArgs e) { var handler = (EventHandler)this.Events[DockStateChangedEvent]; if (handler != null) handler(this, e); }