Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin.Forms Dropdown aka Spinner

Im porting Web APP to a Xamarin.Forms application im now facing a problem that i can't realy find on the net..

How can i create a dropdown in Xamarin.Forms since there is no option for it i tried to use Compiler directives like:

        #if __ANDROID__
         Android.Widget.Spinner dropdown = new Android.Widget.Spinner(this);
        #endif

The thing is i dont have Android.Content.Context since im in Xamarin.Forms. how can i achieve this to make a spinner aka dropdown in my Xamarin.Forms app.

Thanks in Advance. Stefan

like image 803
Stefan van de Laarschot Avatar asked Oct 09 '15 12:10

Stefan van de Laarschot


1 Answers

Use a Picker when the user can select between pre defined values.

like image 83
Wosi Avatar answered Sep 18 '22 01:09

Wosi