private async void DownloadCommand_Executed(object sender, ExecutedRoutedEventArgs e) { var docs = await callback.GetAvailableDocumentsAsync(); var documentsWindow = new DocumentsWindow(docs); documentsWindow.Closed += documentsWindow_Closed; documentsWindow.Show(); }