I'm trying to use a special binding for comparisons found here and recommended on another question. NEQ is an added operator that just gives the opposite result of EQ. An InvalidOperationException is thrown every time with the message "Must have non-null value for 'Binding'".
I've tried reducing the statements to just {Binding SourceExpanded} in the condition for testing and even that throws the same exception.
Source, SourceExpanded, and SourceCollapsed are all dependency properties defined in the class this style is associated with.
Is the issue, that you can't bind to a dependency property with a null value? And if so, why is the property value not allowed to be null?
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Property="IsExpanded" Value="True"/>
<Condition Binding="{local:ComparisonBinding SourceCollapsed, NEQ, {x:Null}}" Value="{x:Null}"/>
</MultiDataTrigger.Conditions>
<Setter Property="Source" Value="{Binding SourceExpanded}"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Property="IsExpanded" Value="False"/>
<Condition Binding="{local:ComparisonBinding SourceCollapsed, NEQ, {x:Null}}" Value="{x:Null}"/>
</MultiDataTrigger.Conditions>
<Setter Property="Source" Value="{Binding SourceCollapsed}"/>
</MultiDataTrigger>
</Style.Triggers>