Which combination of the following actions should you take?

You are employed as an application developer at ABC.com. You make use of Microsoft .NET
Framework 4 to develop Windows Presentation Foundation (WPF) applications.
After developing an application, named ABCApp22, you configure a Button control and a
MenuItem control that will be hosted by a window. The Button control and the MenuItem control
have both been named Add.
You have configured the exact same RoutedCommand, named AddCommand, as the Command
properties of these two controls. You then write the code shown below:
Private void CanAdd (object sender, CanExecuteRoutedEventArgs e) { … }
You are then informed that the two controls should be disabled when the CanExecute property is
set to to false.

Which combination of the following actions should you take? (Choose all that apply.)

You are employed as an application developer at ABC.com. You make use of Microsoft .NET
Framework 4 to develop Windows Presentation Foundation (WPF) applications.
After developing an application, named ABCApp22, you configure a Button control and a
MenuItem control that will be hosted by a window. The Button control and the MenuItem control
have both been named Add.
You have configured the exact same RoutedCommand, named AddCommand, as the Command
properties of these two controls. You then write the code shown below:
Private void CanAdd (object sender, CanExecuteRoutedEventArgs e) { … }
You are then informed that the two controls should be disabled when the CanExecute property is
set to to false.

Which combination of the following actions should you take? (Choose all that apply.)

A.
You should consider having an event handler configured for the CanExecuteChanged event of
the AddCommand command.

B.
You should consider having a CommandBinding object added to the CommandBindings
property of the window.

C.
You should consider having a CommandBinding object added to the CommandBinding section
of the MenuItem control.

D.
You should consider having the CanAdd method called from within the event handler.

E.
You should consider having the AddCommand inherited from the RoutedUICommand class.

F.
You should consider having the Command property of CommandBinding set to the
AddCommand command.

G.
You should consider having the CanAdd method called from within the constructor of the
AddCommand command.

H.
You should consider having the CanExecute property of the CommandBinding object set to the
CanAdd method.

Explanation:



Leave a Reply 2

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


Om Sai Packer And Mover

Om Sai Packer And Mover

Magnificent site. A lot of helpful info here. I am sending it to several buddies ans additionally sharing in delicious. And obviously, thank you in your effort!

https://medium.com/@ncrindiamovers

related web-site

related web-site

Thanks on your marvelous posting! I truly enjoyed reading it, you happen to be a great author. I will be sure to bookmark your blog and will come back later on. I want to encourage continue your great writing, have a nice morning!|