Binding to Picker throws error No property, bindable property, or event found for 'ItemsSource'

We're trying to bind to a Picker control. From the documentation, it looks like all of this should work, but at compile time, we're getting the error:
"No property, bindable property, or event found for 'ItemsSource'"

Snip of the XAML:

<StackLayout>
<Picker ItemsSource="{Binding StartTones}" 
                     ItemDisplayBinding="{Binding Name}"
                            SelectedItem="{Binding ParToneId, Converter={StaticResource Key=startToneToString}, Mode=TwoWay}" />
</StackLayout>

What's going on here? Xamarin.Forms is up to date and this is happening on two separate machines.

Posts

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭
    Try to define a picker in csharp so you can see if exists the property
  • centrolutionscentrolutions USMember ✭✭

    Yes, we can create the Picker in codebehind and it works fine. However, creating it in XAML does not.

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    so ItemsSource exists...

  • centrolutionscentrolutions USMember ✭✭

    Yes, the property ItemsSource exists. There's also a BindableProperty called ItemsSourceProperty.

  • centrolutionscentrolutions USMember ✭✭

    Well, we still have no explanation for this. We've taken to creating all of our Pickers in code-behind including the bindings to the view models. This sucks.

  • GritWesselGritWessel USMember ✭✭

    I have the same problem, just with a User Control of my own.
    If I set the property in code behind it works fine, but if I set it in XAML, it gives me the "No property, bindable property, or event found for 'Source'"

Sign In or Register to comment.