Пример #1
0
#pragma warning restore 618

        private void OnClose(object sender, RoutedEventArgs e)
        {
            var closingWindowEventHandlerArgs = new ClosingWindowEventHandlerArgs();

            OnClosingWindow(closingWindowEventHandlerArgs);

            if (closingWindowEventHandlerArgs.Cancelled)
            {
                return;
            }
            ParentWindow?.Close();
        }
Пример #2
0
 protected void OnClosingWindow(ClosingWindowEventHandlerArgs args)
 {
     ClosingWindow?.Invoke(this, args);
 }