title | description | type | page_title | slug | position | tags | ticketid | res_type |
---|---|---|---|---|---|---|---|---|
Show ScrollViewer for the Time Display Items of RadDateTimePicker |
Enable vertical scroll bar when no space for the clock items of RadDateTimePicker. |
how-to |
Have a scrollbar in the time interval dropdown display |
kb-datetimepicker-show-scrollviewer-for-the-clock-items |
0 |
scrollbar, clock |
1383444 |
kb |
Product Version | 2019.1.116 |
Product | RadDateTimePicker for WPF |
How to show a vertical scrollbar in the time section of the drop down.
- [Extract the ControlTemplate]({%slug styling-apperance-editing-control-templates%}) of RadClock.
- Wrap the ItemsPresenter control of the template in a ScrollViewer control.
- Create a Style targeting RadClock and define a Setter that sets the Template property to the customized ControlTemplate.
- Apply the Style via the ClockStyle property of RadDateTimePicker.
{{region kb-datetimepicker-show-scrollviewer-for-the-clock-items-0}}
<Window.Resources>
<Grid.RowDefinitions>
</Grid.RowDefinitions>
<Border.Background>
</Border.Background>
</Window.Resources>
telerik:RadDateTimePicker
telerik:RadDateTimePicker.ClockStyle
<Style TargetType="telerik:RadClock">
</Style>
</telerik:RadDateTimePicker.ClockStyle>
</telerik:RadDateTimePicker>
{{endregion}}
This template is extracted from the OfficeBlack [theme]({%slug common-styling-appearance-available-themes%}).