The ClockStyle property isn't documented

4 posts, 0 answers
  1. Jan
    Jan avatar
    7 posts
    Member since:
    Aug 2010

    Posted 13 Sep 2010 Link to this post

    In previous versions, there used to be a ClockPanel property to customize the drop-down clock panel. In the newest version, this is marked as deprecated. But there is no or little information on how to use the new ClockStyle property.

    I'm looking to change the number of columns in the drop-down ClockPanel dynamically. 

    Old code:

    <telerik:RadTimePicker x:Name="stopTime" >               
       <telerik:RadTimePicker.ClockPanel>
          <ItemsPanelTemplate>
             <panels:RadUniformGrid x:Name="stopTimePanel" Columns="6" />
          </ItemsPanelTemplate>
       </telerik:RadTimePicker.ClockPanel>
    </telerik:RadTimePicker>

    It is my understanding the the new code would look something like this:
    <telerik:RadTimePicker x:Name="stopTime">
       <telerik:RadTimePicker.ClockStyle>
         <Style TargetType="telerik:RadClock">
            <Setter Property="Template">
               <Setter.Value>
                  <ControlTemplate>
                     <panels:RadUniformGrid x:Name="stopTimePanel" Columns="2" />
                  </ControlTemplate>
               </Setter.Value>
            </Setter>
         </Style>
        </telerik:RadTimePicker.ClockStyle
     </telerik:RadTimePicker>

    But this example doesn't work. The dropdown list simply refuses to show. Can you provide an example of a working ClockStyle that lets you set the displayed number of columns?
  2. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 14 Sep 2010 Link to this post

    Hi Jan,

    Follow the code bellow:
    <telerik:RadTimePicker Margin="10,3" HorizontalAlignment="Center" VerticalAlignment="Center">
                <telerik:RadTimePicker.ClockStyle>
                    <Style TargetType="telerik:RadClock">
                        <Setter Property="ItemsPanel">
                            <Setter.Value>
                                <ItemsPanelTemplate>
                                    <telerik:RadUniformGrid x:Name="stopTimePanel" Columns="2" />
                                </ItemsPanelTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </telerik:RadTimePicker.ClockStyle>
            </telerik:RadTimePicker>


    Sincerely yours,
    Kaloyan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Allen
    Allen avatar
    50 posts
    Member since:
    Mar 2011

    Posted 17 Mar 2011 Link to this post

    I tried this but it  is now complaining that type telerik:RadClock was not found.  Where is that type located?
  5. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 23 Mar 2011 Link to this post

    Hello Jan,

    You need to have this namespace declared into your xaml page:


    All the best,
    Kaloyan
    the Telerik team
Back to Top