Example #1
0
        // Parses the event parameter and invokes the handler with passing the parsed parameter to it
        private void OnCloseDialog(DialogClosingEventArgs e, DialogClosedEventHandler closedEventHandler)
        {
            var parameter    = e.Parameter?.ToString();
            var dialogResult = ParseDialogResult(parameter);

            closedEventHandler?.Invoke(dialogResult);
        }
Example #2
0
 public Task ShowConfirmationAsync(string title, string text, DialogClosedEventHandler closedEventHandler)
 {
     closedEventHandler?.Invoke(DialogResult);
     DialogResult = DialogResult.Unspecified;
     return(Task.CompletedTask);
 }
Example #3
0
 public Task ShowAsync <TView>(object viewModel, DialogClosedEventHandler closedEventHandler) where TView : UserControl, new()
 {
     closedEventHandler?.Invoke(DialogResult);
     DialogResult = DialogResult.Unspecified;
     return(Task.CompletedTask);
 }