Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Trigger a Picker programmatically

JosePedroJosePedro PTMember

Hi there,

I have a picker as a children on my stacklayout. If i press it, the items at the picker are shown, and i can select one. So far so good.

However i want to show it without having to press it, that is, for instance if i have an option at the tabbar, and i press it, i want the picker to show.
How can i achieve this?

Thank you!


  • JosePedroJosePedro PTMember

    Nevermind, i got it. Focus and Unfocus did the trick.

  • AsterinexAsterinex BEMember ✭✭

    Did it work on UWP ?

  • BhautikBhautik Member ✭✭✭

    @JosePedro said:
    Nevermind, i got it. Focus and Unfocus did the trick.

    Focus and UnFocus only work in iOS not in android

  • When nothing else works, try:
    durationPicker.IsVisible = false;
    durationPicker.IsVisible = true;

  • F_MacF_Mac Member

    durationPicker.Focus(); on it's own worked in Android

Sign In or Register to comment.