Skip to content

Latest commit

 

History

History
83 lines (75 loc) · 3.4 KB

kb-datetimepicker-scrollviewer-clock-items.md

File metadata and controls

83 lines (75 loc) · 3.4 KB
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

Environment

Product Version 2019.1.116
Product RadDateTimePicker for WPF

Description

How to show a vertical scrollbar in the time section of the drop down.

Solution

  1. [Extract the ControlTemplate]({%slug styling-apperance-editing-control-templates%}) of RadClock.
  2. Wrap the ItemsPresenter control of the template in a ScrollViewer control.
  3. Create a Style targeting RadClock and define a Setter that sets the Template property to the customized ControlTemplate.
  4. Apply the Style via the ClockStyle property of RadDateTimePicker.

[XAML]

{{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%}).

{{ site.framework_name }} RadDateTimePicker Show ScrollViewer for the Time Display Items