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

Creating DisplayAlert method that returns a bool

$
0
0

So I have an interface that allows me to call methods in my View.xaml.cs file

my method I am trying to implement is something like

    public async Task<bool> ShowAlertWithFeedback(string title, string message, string accept, string cancel)
    {
            var temp = await base.DisplayAlert(title, message, accept, cancel);
            return temp;
    }

So then in my VM

I can call

IMyinterface.ShowAlertWithFeedback.Result

But my application keeps crashing on android.

Any ideas how to implement a method like this?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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