private async void ShowConfirmationDialog() { var confirmationDialog = new ConfirmationDialogViewModel { Title = "Modal Message Example", Message = "This is an example of a modal message", Buttons = MessageBoxButton.YesNo, Icon = MessageBoxImage.Information }; var result = await _modalService.ShowOverlayAsync(confirmationDialog); //If no was selected if (!result.HasValue || !result.Value) { return; } }