エラーメッセージを表示するには、WinForms ErrorProviderコントロールの代わりにWPFで何を使用する必要がありますか?
私はcodeplexとhttp://gallery.expression.microsoft.com/を見てきましたが、似たようなものは見当たりませんでした。
誰かが私に良いWPFの代替品を提案できますか?
アップデート:
WPF検証に関するcodeprojectの記事で適用されている標準的なアプローチを見てみましょう。
<TextBox>
<TextBox.Text>
<Binding Path="Name">
<Binding.ValidationRules>
<ExceptionValidationRule />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
これは、.net3のルールに準拠しています。.net 4では、ExpressionBlendは次のようなコードを生成します。
<TextBox Margin="48,72,63,201" TextWrapping="Wrap" Text="{Binding Input, ElementName=Window, FallbackValue=1+1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextChanged="TextBox_TextChanged" />
このTextBox内にBinding.ValidationRulesを追加しようとすると、コードがクラッシュします。
.net 4に検証を追加する適切な構文は何ですか?