I'm trying to use MultiDataTriggers to enabled/disable a button based on the value of two text boxes.
The docs state that the conditions in a MultiDataTrigger are logically ANDed together. In the example below if txtFirst.Text is foo and txtSecond.Text is bar I'd like to enable the button. However, the button always stays disabled (IsEnabled=false).
I'm sure I'm missing a trick here, but a thorough search of Google hasn't gotten me anywhere....
<StackPanel>
<Button IsEnabled="False" Content="OK">
<Button.Style>
<Style>
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding ElementName=txtFirst, Path=Text}" Value="foo"/>
<Condition Binding="{Binding ElementName=txtSecond, Path=Text}" Value="bar"/>
</MultiDataTrigger.Conditions>
<Setter Property="Button.IsEnabled" Value="True"/>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<TextBox x:Name="txtFirst"/>
<TextBox x:Name="txtSecond"/>
</StackPanel>