This is a migrated thread and some comments may be shown as answers.

RadClock doesn't show times (after upgrading to the latest Telerik WPF Controls)

5 Answers 187 Views
TimePicker
This is a migrated thread and some comments may be shown as answers.
Sandi Markon
Top achievements
Rank 1
Sandi Markon asked on 01 Apr 2011, 02:45 PM
As the title implies, I'm having trouble implementing a stand-alone RadClock (no TimePicker involved) control in my WPF app. Before the latest upgrade (my current version is Q1 2011), it worked smoothly (i set the Culture property to get rid of the 'AM/PM' suffixes), but now it just won't show the times from 0:00 to 23:00. My attempt:

<telerik:RadClock HorizontalAlignment="Left" Margin="1,7,0,0" Name="radTimeFrom" Culture="sl-SI"  VerticalAlignment="Top" Width="166" Height="145">
           <telerik:RadClock.Header>
               <TextBlock Text="From" Foreground="White"/>
           </telerik:RadClock.Header>
       </telerik:RadClock>

Any ideas as to why this thing doesn't work anymore? :)

EDIT: I tried reverting to an older version of the Telerik controls (ver. Q3 2009 SP2) and it works just fine.
EDIT2: But, of course, this is not a solution, because i would still like to have the latest Telerik controls installed, therefore reverting in my case is out of the question. Any info would be greatly appreciated :)



Thanks in advance,
Concerned Developer

5 Answers, 1 is accepted

Sort by
0
Sandi Markon
Top achievements
Rank 1
answered on 04 Apr 2011, 01:56 PM
I worked around the issue by manually setting the ItemsSource property with a 'List<TimeSpan>', filled with the appropriate values. Should have thought of it sooner :) Thank you anyway.
0
Kaloyan
Telerik team
answered on 06 Apr 2011, 08:38 AM
Hello Sandi Markon,

Your approach is the most correct one for your scenario. Let us know if you have any other problems.

Regards,
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
0
Sandi Markon
Top achievements
Rank 1
answered on 05 Aug 2011, 12:13 PM
As a matter of fact, there is still something amiss here.

The header element (in my case the TextBlock) somehow gets ignored. When i run my app, the RadClock control defaults the text to "Clock", even though i excplicitly provided a RadClock.Header tag. Is there some kind of workaround for this?
0
Accepted
Ivo
Telerik team
answered on 09 Aug 2011, 07:56 AM
Hello Sandi Markon,

Using code behind is one possible workaround to set the Header property of the RadClock. Here is a sample code :
TextBlock textBlock = new TextBlock();
textBlock.Text = "New Header";
textBlock.Foreground = new SolidColorBrush(Colors.White);
RadClock.Header = textBlock;

Hope this helps.

All the best,
Ivo
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package.
Get now >>
0
Sandi Markon
Top achievements
Rank 1
answered on 09 Aug 2011, 08:58 AM
Thank you very much. This is a pretty straightforward workaround, so again, I'm forced to say 'Should have thought of it sooner.' :)

Tags
TimePicker
Asked by
Sandi Markon
Top achievements
Rank 1
Answers by
Sandi Markon
Top achievements
Rank 1
Kaloyan
Telerik team
Ivo
Telerik team
Share this question
or