Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Trying to make my own graphical DisplayAlert

$
0
0

Hello everyone, I am trying to make a customizable popup replacement for DisplayAlert. I asked this over in the syncfusion community forum, but thought someone here may have done something like this as well...
Here is my post form their forum.

I have a condition in my app where I want the user to make a selection of two options, and then continue the code path based on their selection

pseud code like this

public async void GetImage()
{
InitializePermissions();

 if ( await SfPopupTool.Show("<title>", "<Message>", "<LocalFileOption>", "<CameraOption>").ConfigureAwait(true)  == false)
 {
      //Code path to use camera to take picure.  
 }
 else
 {
      //Get Image from local fs
 }
 //work with the image and prepare it for use.

}

I want the code to await the user's response, then to continue with their selected path in the code.
I wanted to use the SfPopup since I could use some icons and make the accept and decline options more graphical (I am assuming that I can overload the ImageButton click events to the accept and decline members.
Finally I would also like to know if I can display the popup with no buttons available (Using my own graphical controls for the form?)

In summary,
Can I make the popup.show() awaitable? Or in other words, can I use the return of the popup.Show() for flow control of the app?
Can I hide the Accept button?

Does anyone here have experience with this kind of thing?

My alternative is to build my own view control that I wire all this stuff up in, but I was hoping that there was an easier method to my madness.

Cheers!


Viewing all articles
Browse latest Browse all 204402


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