async void CheckForUpdate_Click(object sender, RoutedEventArgs e) { string newVersion = null; var processingDialog = new ProcessingDialog(Properties.Resources.MsgBox_CheckForUpdates_Title, Properties.Resources.MsgBox_CheckForUpdates_Message); await parentView.dialogHostMain.ShowDialog(processingDialog, async (object s, DialogOpenedEventArgs args) => { newVersion = await vm.CheckForUpdate(); args.Session.Close(false); }); if (newVersion == null) { var okdialog = new OneButtonDialog(Properties.Resources.MsgBox_NotFound_Title, Properties.Resources.MsgBox_NotFound_Message); await parentView.dialogHostMain.ShowDialog(okdialog); return; } NewVersionFound(newVersion); }