You are designing a Windows Presentation Foundation (WPF) application. Business entity
objects are bound to controls on each data entry window. The WPF application must meet
the following requirements: Display a watermark in each empty text box. Display
watermarks in a lighter color than user entries. The watermark code must be reusable with
other user interface controls. You need to recommend an approach for creating the
watermarks. What should you recommend?
A.
Create a value converter to format the bound value of the business entity objects.
B.
Attach a custom attached property and an Adorner to each text box.
C.
Create handlers for the OnFocus and OnFocusLost events of the text boxes in the
codebehind.
D.
Modify each business entity object to return the watermark text if the property has no
data.