#pragma warning restore 618 private void OnClose(object sender, RoutedEventArgs e) { var closingWindowEventHandlerArgs = new ClosingWindowEventHandlerArgs(); OnClosingWindow(closingWindowEventHandlerArgs); if (closingWindowEventHandlerArgs.Cancelled) { return; } ParentWindow?.Close(); }
protected void OnClosingWindow(ClosingWindowEventHandlerArgs args) { ClosingWindow?.Invoke(this, args); }