What should you recommend?

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?

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?

A.
Implement the IDataErrorlnfo interface in the business objects and replace all
ValidationRule elements with ExceptionValidationRule elements.

B.
Implement the IDataErrorlnfo interface in the business objects and replace all
ValidationRule elements with DataErrorValidationRule elements.

C.
Set the ValidationStep attribute on ValidationRule elements to CommittedValue.

D.
Set the ValidationStep attribute on ValidationRule elements to RawProposedValue.



Leave a Reply 0

Your email address will not be published. Required fields are marked *