Fix the halting issue on window close.

This commit is contained in:
GlenCFL 2017-12-07 12:53:44 -05:00
parent 23fa82655b
commit fef20ff36a
1 changed files with 2 additions and 2 deletions

View File

@ -38,9 +38,9 @@ namespace Filtration.Views
} }
} }
private void MainWindow_OnClosing(object sender, CancelEventArgs e) private async void MainWindow_OnClosing(object sender, CancelEventArgs e)
{ {
var allDocumentsClosed = _mainWindowViewModel.CloseAllDocumentsAsync().Result; var allDocumentsClosed = await _mainWindowViewModel.CloseAllDocumentsAsync();
if (!allDocumentsClosed) if (!allDocumentsClosed)
{ {
e.Cancel = true; e.Cancel = true;