This is a migrated thread and some comments may be shown as answers.

DateTimeWatermarkContent doesn't work

0 Answers 12 Views
DateTimePicker
This is a migrated thread and some comments may be shown as answers.
Andrey
Top achievements
Rank 1
Andrey asked on 06 Apr 2016, 12:55 PM

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

No answers yet. Maybe you can help?

Tags
DateTimePicker
Asked by
Andrey
Top achievements
Rank 1
Share this question
or