Resource xaml for RadDatePicker

2 posts, 0 answers
  1. Frank
    Frank avatar
    27 posts
    Member since:
    May 2011

    Posted 06 Jul 2011 Link to this post


    im using Datepicker in RadGridView. Im going to write a Resource .xaml for all RadDatePickers. So that I have to change the property only in one .xaml if necessary. I tried this way:
    <Setter Property="ErrorTooltipContent" Value="Error for Example">
                        <TextBlock Text="{Binding Path=ToolTipConten, ElementName=radDateTimePicker}"

     But it doesnt work...Its the same with Watermarkcontent. How can I solve it?

    Best regards
  2. Konstantina
    Konstantina avatar
    2332 posts

    Posted 11 Jul 2011 Link to this post

    Hello Christian,

    In order to set a DataTemplate to the WaterMark you need to apply it through the DateTimeWatermarkTemplate property, like so:

    <Style x:Key="DatePickerStyle" TargetType="telerik:RadDateTimePicker">
               <Setter Property="DateTimeWatermarkTemplate">
                           <TextBlock Text="WaterMarkText"

    Also, in the DataTemplate binding with the ElementName set to the control is not supported, as it is in different namescope. Binding with ElementName can exist only if the name is inside the DataTemplate.
    Unfortunately, there is no property to which the ErrorToolTip template can be set. You can only set the Content of the ErrorToolTip.

    Hope this information helps.

    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Back to Top