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

How do I close a customControl?

$
0
0

Hi,

Another noob question, I'm afraid!

I have a Portable (i.e. not iOS or Android specific) form. The user has x minutes to complete the screen before my quote expires. When the quote does expire I display a "You're out of time!" message (using DisplayAlert) and send the user back to my app's home page. Not very elegant I know, but the user's journey is effectively dead.

This works fine unless the user has a customControls:CustomPicker open. I still see the message and the user is returned to the home page but the customControl remains open.

Is there any way to programmatically cancel or close the open customControls:CustomPicker ?

Here is my control:

<customControls:CustomPicker x:Name="ExpiryMonth" Placeholder="MM" Title="Expiry Month" Grid.Column="0" SelectedIndexChanged="Expiry_OnSelectedIndexChanged" AutomationId="ExpiryMonth" />

I've tried ExpiryMonth.Disable(), .Unfocus(), IsVisible() with no success, so I'm obviously barking up the wrong tree.

Thanks


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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