I have an object with these properties:

IsLightOnVal is a Collection with 2 fields: string for the State name and Bool for the Value, as we can see in the 2nd picture:

In the ControlTemplate of my Object, I want to create a trigger for: when the value of my first object in my collection is true, then do this….
I can easily access from my property IsLightOnVal1 and IsLightOnVal1 of the 1st picture, but i cannot access to my collection.
So this is working fine:
<Trigger Property="IsLightOnVal1" Value="True">
<Setter Property="Foreground" TargetName="tkValue1" Value="{StaticResource Amber}"/>
</Trigger>
But when I try something with the collection, I never have access, I tried:
<Trigger Property="{Binding IsLightOnVal[0].Value, RelativeSource={RelativeSource AncestorType=NameSpace:MyObject}}" Value="True">
<Setter Property="Foreground" TargetName="tkValue1" Value="{StaticResource Amber}"/>
</Trigger>
But the trigger’s property doesn’t seem to accept binding…
Anyone have a solution?
Regular
Triggersare meant to be used on UI Element Properties. If you want to base a trigger on a bound value you need to use aDataTrigger