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

6 posts, 1 answers
  1. Sandi Markon
    Sandi Markon avatar
    101 posts
    Member since:
    Jul 2012

    Posted 01 Apr 2011 Link to this post

    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
  2. Sandi Markon
    Sandi Markon avatar
    101 posts
    Member since:
    Jul 2012

    Posted 04 Apr 2011 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 06 Apr 2011 Link to this post

    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
  5. Sandi Markon
    Sandi Markon avatar
    101 posts
    Member since:
    Jul 2012

    Posted 05 Aug 2011 Link to this post

    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?
  6. Answer
    Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 09 Aug 2011 Link to this post

    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 >>
  7. Sandi Markon
    Sandi Markon avatar
    101 posts
    Member since:
    Jul 2012

    Posted 09 Aug 2011 Link to this post

    Thank you very much. This is a pretty straightforward workaround, so again, I'm forced to say 'Should have thought of it sooner.' :)

Back to Top
UI for WPF is Visual Studio 2017 Ready