This is a migrated thread and some comments may be shown as answers.
Applying theme to RadDateTimePicker
4 Answers 114 Views
This is a migrated thread and some comments may be shown as answers.
Patxi
Top achievements
Rank 1
Patxi asked on 11 Mar 2009, 11:00 AM
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.

4 Answers, 1 is accepted

Sort by
0
Phenicy Informatica Srl .
Top achievements
Rank 1
answered on 12 Mar 2009, 07:09 PM
I have the same problem.

Thanks for a quick response.

0
Boyko Markov
Telerik team
answered on 13 Mar 2009, 01:30 PM

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.
0
Patxi
Top achievements
Rank 1
answered on 16 Mar 2009, 09:55 AM
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.
0
Boyko Markov
Telerik team
answered on 18 Mar 2009, 08:14 AM
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.
Asked by
Patxi
Top achievements
Rank 1
Answers by
Phenicy Informatica Srl .
Top achievements
Rank 1
Boyko Markov
Telerik team
Patxi
Top achievements
Rank 1
Share this question
or