You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe this is a feature, but it would be great to have a non-dismissable option in the function, so important prompts have to be answered with one of the buttons. Same goes for DisplayActionSheet.
I would like to get an explicit answer from the user, by pressing one of the options. Tapping outside is analogical to Cancel, but the function returns only true or false. The user may not realise that by tapping outside she picked one of the options.
In case of DisplayActionSheet this can be handled, but I have to redisplay the pop up if a bad option is given by tapping outside. A non dismissable option would lead to more elegant behavior.
The text was updated successfully, but these errors were encountered:
The same thing happens with DisplayActionSheet on Windows (but not DisplayAlert).
Also DisplayActionSheet returns null when this happens (both Windows and Android) which can lead to unexpected failures versus the documented behavior.
Description
DisplayAlert can be dismissed by tapping outside of the alert window on Android 10, e.g.:
bool answer = await DisplayAlert("Question?", "Would you like to play a game", "Yes", "No");
In this case tapping outside the alert returns "No."
But the documentation (https://learn.microsoft.com/en-gb/dotnet/maui/user-interface/pop-ups) explicitly states that the behaviour should be modal. It behaves in a modal way on Windows 10.
Maybe this is a feature, but it would be great to have a non-dismissable option in the function, so important prompts have to be answered with one of the buttons. Same goes for DisplayActionSheet.
František
Public API Changes
[DisplayAlert(String, String, String, String, FlowDirection, CanBeDissmissedByTappingOutside)]
[DisplayActionSheet(String, String, String, String[], CanBeDissmissedByTappingOutside)]
Intended Use-Case
I would like to get an explicit answer from the user, by pressing one of the options. Tapping outside is analogical to Cancel, but the function returns only true or false. The user may not realise that by tapping outside she picked one of the options.
In case of DisplayActionSheet this can be handled, but I have to redisplay the pop up if a bad option is given by tapping outside. A non dismissable option would lead to more elegant behavior.
The text was updated successfully, but these errors were encountered: