Which two tasks should you perform?

You are developing a Silverlight 4 application. The application contains a Product class that has a publicBooleanpropertynamed IsAvailable. The application also contains a BoolToVisibilityConverter class. You create an XAML page that contains a Button control. The page is data bound to an instance of the Product class. You need to ensure that the Button control is visible only if the IsAvailable property is true. Which two tasks should you perform?
(Each correct answer presents part of the solution. Choose two.)

You are developing a Silverlight 4 application. The application contains a Product class that has a publicBooleanpropertynamed IsAvailable. The application also contains a BoolToVisibilityConverter class. You create an XAML page that contains a Button control. The page is data bound to an instance of the Product class. You need to ensure that the Button control is visible only if the IsAvailable property is true. Which two tasks should you perform?
(Each correct answer presents part of the solution. Choose two.)

A.
Add an instance of the BoolToVisibilityConverter class in a Resource block.

B.
Set the Button�s DataContext property to an instance of the BoolToVisibilityConverter class.

C.
Set the UserControl�s DataContext property to an instance of the BoolToVisibilityConverter class.

D.
Apply the BoolToVisibilityConverter class to the binding syntax of the Button�s Visibility property.

E.
Apply the BoolToVisibilityConverter class to the binding syntax of the Button�s DataContext property.



Leave a Reply 0

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