Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin Forms: Single button that opens a dropdown menu

Hi does anybody knows if I can make a button in Xamarin Forms that opens a small dropdown menu? I did this in android studio but I can't find a way how this could work in Xamarin.

It should look like this:

It should look like this

And like this if the button is clicked:

And like this if the button is clicked

And the Button should not be in the navigation bar because this page don't have one.

So if anybody could help me I would be very grateful and sorry for my bad english.

like image 365
Markus3D Avatar asked Jan 20 '26 14:01

Markus3D


1 Answers

The closest API in Xamarin that does that is to display a pop-up using DisplayActionSheet, but the dropdown menu will be at the bottom of the screen. Or you can use a Picker (link to documentation).

If you want to implement something that look exactly like the image in your post, you can create a StackLayout that contains a few buttons, and show it when the drop down menu button is clicked.

like image 82
Patrick Avatar answered Jan 22 '26 20:01

Patrick