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