/// <inheritdoc/> protected override void OnDeactivated() { _FillActionContainersController.CustomFillContainers -= FillActionContainersController_CustomFillContainers; var control = View.Editor.Control as Forms.Control; if (control != null) { control.HandleCreated -= GridControlHandleCreated; } if (Frame != null) { Frame.TemplateChanged -= Frame_TemplateChanged; } if (oldFilterFieldsAction != null) { oldFilterFieldsAction.Active.SetItemValue(FilterPanelGroup, true); filterController.FilterFieldsAction = oldFilterFieldsAction; oldFilterFieldsAction = null; } if (buttonsContainer != null) { var template = Frame?.Template as IDynamicContainersTemplate; if (template != null) { template.UnregisterActionContainers(new IActionContainer[] { buttonsContainer }); } if (!buttonsContainer.IsDisposed) { buttonsContainer.Dispose(); } buttonsContainer = null; } if (_FilterPanel != null && !_FilterPanel.IsDisposed) { _FilterPanel.Dispose(); _FilterPanel = null; } _GridControl = null; newFilterFieldsAction.Active.SetItemValue(FilterPanelGroup, false); if (filterController != null) { filterController.Activated -= FilterControllerActivated; } base.OnDeactivated(); }