Skip to content

[Question] How to use ReactiveValidationObject and INotifyDataErrorInfo in WPF #237

@lszczygielek

Description

@lszczygielek

Hi,
I'm playing with validation using INotifyDataErrorInfo and I'm very confused and I don't know how to use it properly. I couldn't find concrete info in documentation, only sample project gives me some clues, but I don't know if it is all what I should know.

Let's say that I want to make a TextBox and default ErrorTemplate (red border) should be visible if value is empty. Based on code from sample I'm suspecting that I have to:

  • bind TextBox Text to view-model using regular XAML binding,
  • in the code behind of view I have to bind using ReactiveUI a ViewModel to DataContext.

So in short - is there another way to use INotifyDataErrorInfo using only ReactiveUi bindings? Unfortunately I can't turn on INotifyDataErrorInfo in other way than regular XAML binding, documentation didn't help me in this topic, only sample application shows me how to do this in regular XAML.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions