private async Task DoShowConfirmationDialogAsync(InteractionContext <ConfirmationViewModel, ResultViewModel?> interaction) { var dialog = new ConfirmationWindow(); dialog.DataContext = interaction.Input; var result = await dialog.ShowDialog <ResultViewModel?>(this); interaction.SetOutput(result); }
private async Task DoShowRemoveDialogAsync(InteractionContext <ConfirmationViewModel, ResultViewModel?> interaction) { var dialog = new ConfirmationWindow(); dialog.DataContext = interaction.Input; //var result = await dialog.ShowDialog<ItemViewModel?>(((IClassicDesktopStyleApplicationLifetime)Application.Current.ApplicationLifetime).MainWindow); var result = await dialog.ShowDialog <ResultViewModel?>(((IVisual)this).FindAncestorOfType <Window>()); interaction.SetOutput(result); }