You need to ensure that when LastName is empty, the Sav…

You are developing a Universal Windows Platform (UWP) app. The application architecture uses the ModelView-ViewModel (MVVM) pattern.
You are designing a form to add new contacts to the app. The form contains an input field named LastName
and a Save button.
You need to ensure that when LastName is empty, the Save button is disabled.What should you use?

You are developing a Universal Windows Platform (UWP) app. The application architecture uses the ModelView-ViewModel (MVVM) pattern.
You are designing a form to add new contacts to the app. The form contains an input field named LastName
and a Save button.
You need to ensure that when LastName is empty, the Save button is disabled.What should you use?

A.
On the Save button, change the IsDefaulted property and the IsDefault property.

B.
Use an InputType enumeration that has a Command member.

C.
Use a CommandBinding object that contains a CanExecute event.

D.
On the Save button, change the IsSealed value.

Explanation:
The CommandBinding.CanExecute event occurs when the command associated with this CommandBinding
initiates a check to determine whether the command can be executed on the command target.

https://msdn.microsoft.com/en-us/library/system.windows.input.commandbinding.canexecute(v=vs.110).aspx



Leave a Reply 0

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