ShowMessageDialogAsync Navigation in ViewModel does not prompt to the user modally #2432
Unanswered
modula2019
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all. Please I am having trouble using ShowMessageDialogAsync to display a message to prompt to the user in a modal form. Every time the section of the code is encountered, the current page navigates back to the previous page without showing this dialog.
For example, page1 calls page2 with this code below:
var result = await Navigator.NavigateViewModelForResultAsync<Page2ViewModel, decimal>(this, qualifier: Qualifiers.Dialog,data: timesheet, cancellation: ct).AsResult();
Inside page2viewmodel, I have a button that calls a ValueTask. Inside the ValueTask, I have this section of the code that checks for a condition. If the condition fails, it should display this dialog and should not allow the user to do anything until the dialog is dismissed. See the code section below
Every time, this condition is triggered, the ShowMessageDialogAsync navigates back to the previous page Page1. Please what am I doing wrong? Thanks
Beta Was this translation helpful? Give feedback.
All reactions