How to popup a numberPicker when i press a button and get the choosen number?

Hello. In my app I need to display a number picker when I press a button and after that I want to get the selected number. Can anyone help me? Thank you for your time.

Answers

  • FrankGuerraFrankGuerra USMember ✭✭

    you can search for a plugin for that or do it for yourself.

    i did something like that here's the code:

    <StackLayout> <Button Text="-"/> <Entry Placeholder="Number"/> <Button Text="+"/> </StackLayout>

    that will bring up a layout with 2 side buttons and a centered entry which will show the picked number, you should handle the events the way you're working either code behind or viewmodel, i just used clicks events for each button, the left one to decrease the number and the right one to increase it aswell, and just update the text in the entry every time you press any of the buttons.

    Hope this helps.

Sign In or Register to comment.