wpf Validation style
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
<Trigger Property="Validation.HasError" Value="True"> <Setter TargetName="Bd" Property="BorderBrush" Value="Red"/> </Trigger>
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
<Setter Property="Validation.ErrorTemplate"> <Setter.Value> <ControlTemplate> <!--<AdornedElementPlaceholder> <Border BorderBrush="Red" BorderThickness="1" CornerRadius="5" SnapsToDevicePixels="True" /> </AdornedElementPlaceholder>--> </ControlTemplate> </Setter.Value> </Setter>
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
<Setter Property="Validation.ErrorTemplate" Value="{DynamicResource InputErrorTemplate}" /> <Style.Triggers> <Trigger Property="Validation.HasError" Value="True"> <Setter Property="ToolTip"> <Setter.Value> <Binding Path="(Validation.Errors).CurrentItem.ErrorContent" RelativeSource="{x:Static RelativeSource.Self}" /> </Setter.Value> </Setter> </Trigger> </Style.Triggers>