Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

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

$
0
0

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.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>