コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }