I am having the style trigger like below .
<Style x:Key="ValidationButtonErrorStyle" TargetType="Button" BasedOn="{StaticResource ResourceKey=btnStyle}" >
<Style.Triggers>
<Trigger Property="Validation.HasError" Value="true">
<Setter Property="IsEnabled" Value="false" />
</Trigger>
</Style.Triggers>
</Style>
I want to add this style trigger to my button , so that when the validation error happens in the page ,
<Button Content="{Binding StringResources.XXXX, Source={StaticResource ResourceStrings}}"
Style="{StaticResource ResourceKey=ValidationButtonErrorStyle}"
Width="150"
Command="{Binding XXXX}">
</Button>
then my button should get disabled. if not it should be in enabled state .
I tried the above code samples but no luck. Can any one point me what i am missing or help me how to achieve this .