Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>One thing I can say, <code>Watermark</code> in <code>DatePicker</code> implemented buggy, there is no easy access. Perhaps, because of this difficulty, the localization of the text does not work. There is a wonderful article of <code>@Matt Hamilton</code>, quote from <a href="http://matthamilton.net/datepicker-watermark" rel="nofollow noreferrer">here</a>:</p> <blockquote> <p>Something that a lot of people (myself included) don't like about the DatePicker, though, is that by default if no date is displayed it shows the text "Select a date" as a watermark, and this text is baked into the control - it's not localized or accessible by any public property. This is particularly frustrating if the date in question is optional and you don't necessarily want to prompt your users to select one.</p> </blockquote> <p>In the same article, he provide the decision of how to access to <code>Watermark</code>. Here:</p> <p><a href="https://stackoverflow.com/questions/3672258/how-to-localize-the-wpf-4-0-datepicker-control">How to localize the WPF 4.0 DatePicker control</a></p> <p><code>@Wayne Maurer</code> created a universal solution in the form of <em>attached</em> dependency property:</p> <pre><code>&lt;DatePicker Grid.Row="2" local:DatePickerWatermarkBehaviour.Watermark="Select the date" /&gt; </code></pre> <p>You need to be based on the current culture, set the text for watermarks, e.g. using above example.</p> <p><code>Note:</code> In Silverlight to <code>Watermark</code> in <code>DatePicker</code> made access [<a href="http://blogs.msdn.com/b/silverlight_sdk/archive/2010/05/06/changing-the-watermark-text-in-a-datepicker-control.aspx" rel="nofollow noreferrer"><code>link</code></a>]:</p> <pre><code>DatePickerTextBox box = base.GetTemplateChild("TextBox") as DatePickerTextBox; box.Watermark = "Type or select a date --&gt; "; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload