私は何か見落としてますか?
1- スタイル
<Style TargetType="{x:Type TextBox}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Validation.HasError}" Value="true">
<Setter Property="BorderBrush" Value="Blue" />
</DataTrigger>
</Style.Triggers>
<Setter Property="MinWidth" Value="160" />
<Setter Property="Margin" Value="0 7 0 0"/>
</Style>
2 - ビューモデルは IDataErrorInfo を実装します 3 - ビュー内の textBox
<TextBox x:Name="FirstName" Text="{Binding Person.FirstName, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=true}"></TextBox>
3 - Caliburn MVVM を使用しています
「BindingExpression path error: 'Validation' property not found on 'object' ''PersonWindowViewModel' (HashCode=38783181)'. BindingExpression:Path=Validation.HasError; DataItem='PersonWindowViewModel' (HashCode=38783181); ターゲット要素は'TextBox' (Name='FirstName'); ターゲット プロパティは 'NoTarget' (type 'Object')"S