protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); ToolBar toolBar = this._propGrid.Controls[0] as ToolBar; if (toolBar != null) { this._toolBarSubclasser = new PropertyGridToolBarSubclasser(toolBar); this._toolBarSubclasser.Subclass(); } }
protected override void OnHandleDestroyed(EventArgs e) { if (this._toolBarSubclasser != null) { this._toolBarSubclasser.Unsubclass(); this._toolBarSubclasser = null; } base.OnHandleDestroyed(e); }