Applying theme to RadDateTimePicker

5 posts, 0 answers
  1. Patxi
    Patxi avatar
    70 posts
    Member since:
    Feb 2009

    Posted 11 Mar 2009 Link to this post

    Hello,

    First of all, I have been looking through all the posts looking for similar problem and despite there is an interesting post it hasn´t helped me, so I have decided to open a new thread.

    I have added a RadDateTimePicker and I would like to apply a theme but not to the textbox but to the calendar. The background of the calendar is white and I would like to change it. I don´t mind to change a background color to the header or just change the theme to a radCalendar.

    I have implemented the following code but didn´t work:
              this.radDateTimePicker1.ThemeName = "Telerik";
    Unfortunately the theme is only applied to the textbox and calendar keeps the default theme.

    What can I do to apply a theme ONLY to the calendar?

    Thank you in advance.
  2. Phenicy Informatica Srl .
    Phenicy Informatica Srl . avatar
    5 posts
    Member since:
    Feb 2009

    Posted 12 Mar 2009 Link to this post

    I have the same problem.

    Thanks for a quick response.

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 13 Mar 2009 Link to this post

    Hi Phenicy Informatica Srl .,

    This is very strange issue and we aren't able to reproduce it. However you can use the sample code below to control the properties of the RadCalendar used in RadDateTimePicker. Here is the code snippet: 


    RadCalendar calendar = (this.radDateTimePicker1.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar).Calendar; 
     
    calendar.ThemeName = "Telerik";  

    I hope this helps you. Please contact me if you have any other questions regarding RadDateTimePicker.

    Greetings,

    Boyko Markov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Patxi
    Patxi avatar
    70 posts
    Member since:
    Feb 2009

    Posted 16 Mar 2009 Link to this post

    Hi Boyko,

    I have used the code you have written and unfortunately didn´t work.

    It doesn´t apply any theme.

    I don´t know whether worked for more people, at least not to me. Did work to you, Phenicy Informática Srl.?

    any more ideas?

    Thank you.
  6. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 18 Mar 2009 Link to this post

    Hello Patxi,

    By default only the ControlDefault theme is loaded. If you want to use any other theme in your application you will need to drag and drop the corresponding theme component(e.g. Office2007Black). When you change the ThemeName from the dropdown the theme will be applied. I have attached a very simple project demonstrating how you can change themes. You need to add references to Telerik.WinControls.UI, Telerik.WinControls, Telerik.WinControls.Themes.Telerik and TelerikCommon assemblies.

    Please write me back if you need more information.

    All the best,
    Boyko Markov
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for WinForms is Visual Studio 2017 Ready