New to Telerik UI for WPF? Download free 30-day trial

Empty Content

The empty content of DateRangePicker is displayed when no dates are selected and the control is not focused.

By default there is nothing displayed in the empty content area. To change this, set the EmptyContent property of RadDateRangePicker.

Setting the empty content

<telerik:RadDateRangePicker EmptyContent="Select dates range" /> 
Picture showing WPF RadDateRangePicker with string assigned to the EmptyContent

To customize the empty content further, you can use a visual element in the EmptyContent or define a DataTemplate and assign it to the EmptyContentTemplate property. The data context passed to the EmptyContentTemplate is the value of the EmptyContent property.

Setting visual element in the empty content

<telerik:RadDateRangePicker> 
    <telerik:RadDateRangePicker.EmptyContent> 
        <TextBlock Text="Select dates range" Foreground="#F5CC84" FontStyle="Normal"/> 
    </telerik:RadDateRangePicker.EmptyContent> 
</telerik:RadDateRangePicker> 

Setting the empty content template

<telerik:RadDateRangePicker> 
    <telerik:RadDateRangePicker.EmptyContentTemplate> 
        <DataTemplate> 
            <TextBlock Text="Select dates range" Foreground="#F5CC84" FontStyle="Normal"/> 
        </DataTemplate> 
    </telerik:RadDateRangePicker.EmptyContentTemplate> 
</telerik:RadDateRangePicker> 
Picture showing WPF RadDateRangePicker with visual element assigned as EmptyContent

See Also

In this article