I am currently studying WPF and using MultiTrigger and the conditions for setting some control properties. I know that MultiTrigger conditions must be met (AND-Operator) in order to set the value specified by Setter.
But is there a Condition if the value is not satisfied (let's call it NotCondition). I have a small example to illustrate what I mean.
The background property should be set to “Red” if the mouse is above the control and the contents are “Hello World”. Otherwise, if the mouse is over and the content is not "Hello World", the background should be "Blue."
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="Content" Value="Hello World" />
</MultiTrigger.Conditions>
<Setter Property="Background" Value="Red"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
</MultiTrigger.Conditions>
<Setter Property="Background" Value="Blue"/>
</MultiTrigger>
- WPF/XAML? NotCondition Condition ?