I want that that when a property change, analize the values of the properties and set the text of a text block. I have this:
With multi binding:
<TextBlock>
<TextBlock.Text>
<MultiBinding Converter="{StaticResource MyMultivalueConverter}">
<Binding />
<Binding Path="AnotherProperty"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
With multi data trigger:
<TextBlock HorizontalAlignment="Center" Margin="0,20,0,0" FontSize="28">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=." Value="0" />
<Condition Binding="{Binding Path=AnotherProperty}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Text" Value="Mytext" />
</MultiDataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
The main difference that I see is that in the multibinding I need a multi value converter. However, with the multi data trigger, I need to set all the combinations to set the differents texts that I want to display according to the values of the properties, so this is a very hard work.
So my doubt is which is the advantege of multi data trigger, because I need to set many combinations and with the multi binding I create a converter that also allows complex comparations like greater than, less than... With multi data trigger only a value for each combination.
In sumary, when to use multi binding and when multi data trigger? Which are the advantages of multi binding and the advantages of the multi data trigger?
thank so much.