I have a editable combobox that text is bound to an object property. I have associated a exceptionsValidationrule with the text property and it is working and turning the control red. I need to also disable a button but I can't seam to find how to check the validation.haserrors in this case
my XAML for the combo box
<ComboBox Margin="0,3,0,3" Width="40" Name="CATCODE" IsEditable="True" >
<ComboBox.Text>
<Binding Path="CategoryCode" >
<Binding.ValidationRules>
<ExceptionValidationRule >
</ExceptionValidationRule>
</Binding.ValidationRules>
</Binding>
</ComboBox.Text>
</ComboBox>
The data trigger
<Style x:Key="DisbleOnValidation" TargetType="Button">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Validation.HasError, ElementName=CATCODE}" Value="True" >
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
</Style>