I have DependencyProperty State of Flags enum type. I want to change some element border color due to changing of the State property. For some reasons I can not operate with the element directly but only by setting its Style.
How can I change following code to make it possible not to check exact value of State but check whether it contains desired flag?
<Style.Triggers>
<Trigger Property="State" Value="None">
<Setter Property="StateBorderBrush" Value="Transparent"/>
</Trigger>
<Trigger Property="State" Value="Covered">
<Setter Property="StateBorderBrush" Value="Blue"/>
</Trigger>
<Trigger Property="State" Value="Selected">
<Setter Property="StateBorderBrush" Value="Red"/>
</Trigger>
<Trigger Property="State" Value="contains flag 'Controlled'">
<Setter Property="StateBorderBrush" Value="Orange"/>
</Trigger>
</Style.Triggers>