DataTrigger Binding System.InvalidOperationException: bindable not an instance of AssociatedType

PatrickJelittoPatrickJelitto Member ✭✭✭
edited June 2018 in Xamarin.Forms

Hi Guys,

i have the following xaml:

<Label Text="{Binding MyObject.NumerOutOfEight, StringFormat='{0}/8'}"/>
             <Label.Triggers>
                 <DataTrigger TargetType="Label" Binding="{Binding MyObject.NumerOutOfEight}" Value="8">
                          <Setter Property="TextColor" Value="#656565"></Setter>
                  </DataTrigger>
            </Label.Triggers>

I want to change the textcolor of my Label when the Value of the Bound Property is 8.
Without the Trigger in the Label i can see that the Value of MyObject.NumerOutOfEight is 8.
But after the Trigger in my xaml i get this error when i start the application and go into my page:
System.InvalidOperationException: bindable not an instance of AssociatedType.

Can u help me?
Thank you in advance.

Best Answer

Answers

  • PatrickJelittoPatrickJelitto Member ✭✭✭

    anyone please?

  • PatrickJelittoPatrickJelitto Member ✭✭✭

    bump

  • PatrickJelittoPatrickJelitto Member ✭✭✭

    @David_Gonzalez FACEPALM Thank you.

Sign In or Register to comment.