Someone recently asked about how to change the watermark text in a DatePicker control. Here’s a picture of the DatePicker control. I’ve drawn an arrow to the watermark text.
Unfortunately, changing the watermark text is not as easy to do as you might think, and I can only change it the first time it displays.
The DatePicker control has a template part of type DatePickerTextBox that exposes a Watermark property. You'll see this part declared in the class overview topic of the DatePicker control:
[TemplatePartAttribute(Name = "TextBox", Type = typeof(DatePickerTextBox))]
There are multiple ways to tackle this problem, but one of the easiest ways I see to do it is to derive from DatePicker and override OnApplyTemplate. You can then retrieve the TextBox part and set the watermark.
If you go this route, keep in mind that the default implementation of the watermark text adjusts depending on the whether the selected date format is long or short. If you override the watermark you might want to take this in consideration as the user will lose an important hint about the expected format of the date.
One way to deal with this is to retrieve the selected date format and use it when you set the watermark. (I have to point out that this example requires a very wide date picker, which is not ideal, but you get the idea):
I hope this helps.