I need a Style in WPF that sets multiple properties when filling in multiple conditions. However, one of my conditions is of type Not Equal To . How do I change the Style below so that the condition becomes Not Equal To ? Can this be done even without an IValueConverter ?
<Style> <Style.Triggers> <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding Path=id}" Value="3"/> </MultiDataTrigger.Conditions> <Setter Property="Background" Value="Red"/> <Setter Property="Foreground" Value="Black"/> </MultiDataTrigger> </Style.Triggers> </Style>
I will need the following, but this, of course, does not work, since triggers only support the Equal operator.
<Style> <Style.Triggers> <MultiDataTrigger> <MultiDataTrigger.Conditions> <!--<Condition 1 here.../>--> <!--<Condition 2 here.../>--> <Condition Binding="{Binding Path=id}" Value<>"3"/> </MultiDataTrigger.Conditions> <Setter Property="Background" Value="Red"/> <Setter Property="Foreground" Value="Black"/> </MultiDataTrigger> </Style.Triggers> </Style>
source share