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

DisplayAlert not displaying and hanging app

$
0
0

What am I doing wrong?

I subscribe via Messaging Center in my view, which should pop up a displayalert. In my view model, I send it what to pop up. When it hits the displayalert code in the view, it hangs.

Here is the pertinent code from the viewmodel:

    MessagingCenter.Send<SQ_QUOTEDETAIL>(_quotedetail, "CanBeLeased");

And from the view:

        MessagingCenter.Subscribe<SQ_QUOTEDETAIL>(this, "CanBeLeased", (sender) =>
        {
            var bPurchased = DisplayAlert("Possible Lease Item",
                "Is this item going to be purchased or leased?", "Purchased", "Leased");
            sender.PURCHASED = bPurchased.Result;
        });             

Viewing all articles
Browse latest Browse all 89864

Trending Articles



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