protected override void OnClosing(CancelEventArgs e) { DelegateCommand.TryExecuteCommand((DataContext as AllOrdersViewModel)?.SaveToStorageCommand, null); }