Use Application.Current.MainPage.DisplayAlert defaul of Maui show and not show correct #24716
Replies: 1 comment 1 reply
-
Hey @trungthong sorry, after I had a first glance and converted it to a discussion I realized that it might not be the correct thing to do. Sorry about that. But before we go back to a potential issue I do think we need to make this more actionable. Without any code its pretty much impossible to say something useful about this. What is the code your using, ideally share a reproduction project, and in which scenarios is it not (always) working? Also you indicate that this has worked in earlier version of .NET MAUI? Do you know which? If you downgrade to that version, does it work then? Lastly, I notice that you mention an older version than is currently released. Could you update to the latest and try again? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Description
I have a issue for show alert in Maui.
i use Application.Current.MainPage.DisplayAlert("title","message") to show alert in app. But it sometimes it shows sometimes it doesn't? besides that I also show other messages. and of course I use await to wait for it to complete.
but I also check that Application.Current.MainPage is FlyoutPage. and I don't understand why sometimes it shows and sometimes it doesn't show?
my scenario is as follows:
off the network and on the network, when on the network, change the page then call api, the result is show Alert. use as I wrote above. (And I always have the result when there is network, and it is completely error free?) .
I think it is possible that I change the page so it is a problem, but I'm not sure it is correct.
Can anyone help me with this problem? Thank you very much.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.6 SR1
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.6 SR1
Affected platforms
iOS
Affected platform versions
all version
Did you find any workaround?
I tried increasing the time to show alert, putting everything in mainthread, managing alert again but none of it solved my problem.
Beta Was this translation helpful? Give feedback.
All reactions