private void OnClosing(object sender, CancelEventArgs cancelEventArgs) { _closing = true; ListOfOpenededMenuHandle.Remove(Handle); Deactivate -= OnDeactivate; Activated -= OnActivated; Closing -= OnClosing; PreviewKeyDown -= OnPreviewKeyDown; }
protected override void OnClosing(CancelEventArgs e) { _closing = true; ListOfOpenededMenuHandle.Remove(Handle); base.OnClosing(e); }