Which class needs to implement INotifyDataErrorInfo?
-
02-07-2021 - |
Вопрос
In the case of a binding such as
<TextBox Text={Binding Path=SomeItem.AnotherItem.Property} />
Which class(es) need to implement INotifyDataErrorInfo:
- The DataContext
- SomeItem
- AnotherItem
- Some combination of these
Решение
AnotherItem
INotifyDataErrorInfo
must be implemented by object who own's the property to which is bound.
Другие советы
If you're using an MVVM pattern , the INotifyDataErrorInfo is usually implemented by the view-model. This view-model, usually, is then your view's datacontext.
Не связан с StackOverflow