Вопрос

In the case of a binding such as

<TextBox Text={Binding Path=SomeItem.AnotherItem.Property} />

Which class(es) need to implement INotifyDataErrorInfo:

  1. The DataContext
  2. SomeItem
  3. AnotherItem
  4. 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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top