nerdexam
Microsoft

70-518 · Question #229

You are designing a Windows Presentation Foundation (WPF) data entry application. The application uses data binding to bind controls in the user interface (UI) to business objects. The UI uses…

The correct answer is D. Implement the IDataErrorlnfo interface in the business objects and replace all ValidationRule. See the full explanation below for the reasoning.

Question

You are designing a Windows Presentation Foundation (WPF) data entry application. The application uses data binding to bind controls in the user interface (UI) to business objects. The UI uses validation rules for each input control. The data validation rules change based on the state of the business object. You need to recommend a validation strategy that will allow changes to the validation rules without changes to the UI code. What should you recommend?

Options

  • ASet the ValidationStep attribute on ValidationRule elements to RawProposedValue.
  • BSet the ValidationStep attribute on ValidationRule elements to CommittedValue.
  • CImplement the IDataErrorlnfo interface in the business objects and replace all ValidationRule
  • DImplement the IDataErrorlnfo interface in the business objects and replace all ValidationRule

How the community answered

(51 responses)
  • A
    8% (4)
  • B
    4% (2)
  • C
    12% (6)
  • D
    76% (39)

Community Discussion

No community discussion yet for this question.

Full 70-518 Practice