Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Crush after receving a message and calling DisplayActionSheet

$
0
0

Hi All,
I have really simple scenario, I have a viewModel with timer and when the timer is 0 this viewModel sends a message to the view that time has ended.

MessagingCenter.Send<ViewModel>(this, "IsTimeEnded");

and in the view:

MessagingCenter.Subscribe<PomodoroViewModel>(this, "IsTimeEnded", async (sender) =>
                {
                    var action = await DisplayActionSheet("End?", "Cancel", "", "Yes", "No", "Maybe");
                    Console.WriteLine("Action: " + action);
                });

After I put there this DisplayActionSheet application is crushing but when I have only Console.Writeline("end") everything works ok.
Please tell me why? The same thing is happened when I'm going to use DisplayAlert.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>