DateTimeWatermarkContent doesn't work

1 posts, 0 answers
  1. Andrey
    Andrey avatar
    7 posts
    Member since:
    Jun 2012

    Posted 06 Apr Link to this post

    Hello,

    In a project I use RadDateTimePicker (InputMode="DatePicker", DateTimeWatermarkContent="Custom watermark") as a separate control and as a part of DataTemplate for items in ListBox (ItemsControl). Initially I used version 2013.3, then I tried to use version 2015.2. Separate controls work fine. But RadDateTimePicker in DataTemplate began to display "EnterDate" for watermark content. The only thing I changed was Telerik dlls of another version.

    <Window x:Class="RadDateTimePickerDemo.MainWindow"
            xmlns:local="clr-namespace:RadDateTimePickerDemo"
            mc:Ignorable="d"
            Title="MainWindow" Height="350" Width="500">
         
        <Grid Margin="10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="20"/>
                <ColumnDefinition Width="160"/>
            </Grid.ColumnDefinitions>
     
            <telerik:RadDateTimePicker VerticalAlignment="Top" Margin="0,2,0,0"
                InputMode="DatePicker"
                DateTimeWatermarkContent="Custom watermark"/>
     
            <ListBox x:Name="listBox" Grid.Column="2"
                     HorizontalContentAlignment="Stretch"
                     BorderThickness="0" Padding="0">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <telerik:RadDateTimePicker
                            InputMode="DatePicker"
                            DateTimeWatermarkContent="Custom watermark"/>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
    </Window>

    I attached screenshots for different versions. Project's .net version - 4.6, Windows 10, 64bit.

    Regards,
    Andrey

Back to Top