static internal void RaiseWindowCloseEvent(ExtensionWindow sender) { ExtensionWindowClosingRoutedEventArgs args = new ExtensionWindowClosingRoutedEventArgs(ClosingEvent, sender); sender.RaiseEvent(args); if (!args.Cancel) { sender.RaiseEvent(new RoutedEventArgs(CloseEvent, sender)); } }
void OnExtensionWindowClosing(object sender, ExtensionWindowClosingRoutedEventArgs e) { e.Cancel = true; e.Handled = true; ((ExtensionWindow)sender).IsEnabled = false; }