Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TimePicker > The ClockStyle property isn't documented

Not answered The ClockStyle property isn't documented

Feed from this thread
  • Jan avatar

    Posted on Sep 13, 2010 (permalink)

    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?

    Reply

  • Kaloyan Kaloyan admin's avatar

    Posted on Sep 14, 2010 (permalink)

    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

    Reply

  • Allen avatar

    Posted on Mar 17, 2011 (permalink)

    I tried this but it  is now complaining that type telerik:RadClock was not found.  Where is that type located?

    Reply

  • Kaloyan Kaloyan admin's avatar

    Posted on Mar 23, 2011 (permalink)

    Hello Jan,

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


    All the best,
    Kaloyan
    the Telerik team

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TimePicker > The ClockStyle property isn't documented
Related resources for "The ClockStyle property isn't documented"

WPF TimePicker Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]