How to override the light theme in RadCalendar?

6 posts, 0 answers
  1. David
    David avatar
    5 posts
    Member since:
    Aug 2012

    Posted 17 Aug 2012 Link to this post

    Dear sirs,

    Basically when the device is in light theme, RadCalendar displays in the light theme in white background. But as per my application i need always Dark theme throughout the application. So if i change the Device theme to light , i need to change the RadCalendar theme to Dark theme always. Can you please help me ? How to achieve this in the RadCalendar? I am using the licensed version of RadWindowsPhone controls.

    -David C
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 20 Aug 2012 Link to this post

    Hello David,

    There is no embedded mechanism for this in our controls. By default our controls use the system resources to provide colors.

    How you are overriding the default theme in your application?

    All the best, Valentin.Stoychev
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. David
    David avatar
    5 posts
    Member since:
    Aug 2012

    Posted 21 Aug 2012 Link to this post

    Hi Valentine,

    We use the ThemeManager to override the Theme to Dark Theme.. I actually downloaded the ThemeManager from the following link.

    http://nuget.org/packages/PhoneThemeManager 

    So in the application start , i set the ThemeManager.ToDarkTheme(). So it will automatically override the application to the DarkTheme always. But it missed to update the RadCalendar. Could you please help me ?

    Regards,
    David C
  5. Lancelot
    Lancelot avatar
    251 posts
    Member since:
    Jul 2012

    Posted 21 Aug 2012 Link to this post

    Hi David,

    You're in luck because I just recently did this to a RadCalendar instance in my latest app. You can override the control's system resource bindings by explicitly setting the BackGround, Foreground and GridLine colors.

    Keep in mind that if you do this, you lose RadCalendar's ability to adapt to the user's preferences. Take a look at my attached screenshot. The phone is set to light theme and the RadCalendar defers to the explicitly set color values.

    Here is my code for the instance you see in the screenshot
    <telerikInput:RadCalendar SelectedValueChanged="RadCalendar_SelectedValueChanged"
                                      MonthInfoDisplayMode="Small"
                                      AppointmentSource="{StaticResource CalendarAppointments}"
                                      IsTodayHighlighted="True" Background="Black" Foreground="#DEFFFFFF" GridLinesBrush="#DEFFFFFF"
                                      />



    Good Luck,
    Lancelot
  6. David
    David avatar
    5 posts
    Member since:
    Aug 2012

    Posted 22 Aug 2012 Link to this post

    Hi Lancelot,

    Thanks for your suggestion.

    Yes. In this way , whether can we customize the disabled days foreground color.? . Because i actually disable the holidays in the calendar using DataTemplateSelector. In the light theme i want to customize this disable holidays color and also the previous and next month days color in the current month view.

    Regards,
    David C
  7. Todor
    Admin
    Todor avatar
    778 posts

    Posted 22 Aug 2012 Link to this post

    Hello David,

    You can have a look at this article about special dates and special templates. You can have your own template for the disabled days. !button.IsFromCurrentView would give you the days from the previous and next month and info.Date.Value.DayOfWeek would give information about whether the day is Saturday or Sunday.

    I hope this information helps.

    Kind regards,
    Todor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner