How To Bind Picker in C#

Pavan506Pavan506 INMember
edited January 2017 in Xamarin.Forms

how to bind picker ? i dont need in xml, i want to be done in a class.

Best Answer

Answers

  • AlessandroCaliaroAlessandroCaliaro ✭✭✭✭✭ ITMember ✭✭✭✭✭

    Bind without binding? I don't understand
    You can add Items to your picker... but it's not binding

  • Pavan506Pavan506 INMember

    @AlessandroCaliaro said:
    Bind without binding? I don't understand
    You can add Items to your picker... but it's not binding

    please give some sample example how to do

  • ClintStLaurentClintStLaurent ✭✭✭✭✭ USUniversity ✭✭✭✭✭

    @AlessandroCaliaro
    The OEM Picker from Xamarin does not have a bindable source property - Crazy I know.
    I think that's what @Pavan506 is asking: How are you supposed to bind a collection to it when it has no Source property?

    The answer is: You can't.
    However, there are several open-source alternatives. If you google "Xamarin bindable picker" you should see at least 3-6 different NuGet packages. You may have to download a couple and play with them to find one that matches your needs and works for you.

  • Pavan506Pavan506 INMember

    @ClintStLaurent said:
    @AlessandroCaliaro
    The OEM Picker from Xamarin does not have a bindable source property - Crazy I know.
    I think that's what @Pavan506 is asking: How are you supposed to bind a collection to it when it has no Source property?

    The answer is: You can't.
    However, there are several open-source alternatives. If you google "Xamarin bindable picker" you should see at least 3-6 different NuGet packages. You may have to download a couple and play with them to find one that matches your needs and works for you.

    please give some sample example how to do

  • ClintStLaurentClintStLaurent ✭✭✭✭✭ USUniversity ✭✭✭✭✭

    I'm not doing your homework for you, or writing your code for you.

    How about this: You make an effort and give it a try then come back and post code you're having issues with. You won't learn anything if all you do is copy/paste code given to you.

  • AlessandroCaliaroAlessandroCaliaro ✭✭✭✭✭ ITMember ✭✭✭✭✭
  • AlessandroCaliaroAlessandroCaliaro ✭✭✭✭✭ ITMember ✭✭✭✭✭

    Last XF pre should have one

Sign In or Register to comment.