Using the PromptDecorator

The PromptDecorator adds a textual prompt to another control. The prompt is shown as an overlay on the control. To use the PromptDecorator, place it around the target control:

<ms:PromptDecorator Prompt="Search in programs and files">
  <TextBox />

By default, the prompt is hidden as soon as the user clicks in the target control. To keep the prompt visible, set the ShowIfFocused property.

To provide additional decoration such as a graphic (say, a magnifying glass icon), use the PromptTemplate property. To access the prompt string from within the prompt template, use {Binding}.