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

changing theme at runtime

7 Answers 129 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chitra Krishnan
Top achievements
Rank 1
Chitra Krishnan asked on 19 Nov 2009, 10:46 AM
Hi Team,

Can u please let me know how to changes canvas themes at runtime..?

Regards
Chitra K

7 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 19 Nov 2009, 04:32 PM
Hi Chitra Krishnan,

In order to apply  the themes at runtime you have to set
telerik:StyleManager.Theme="{Binding SelectedValue, ElementName=Themes}"
on all controls how you are using. In the snippet above, ElementName is the x:Name of the control used to change the themes. Have a look at the attached sample project and let us know if you have any additional questions.

Greetings,
Dimitrina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Chitra Krishnan
Top achievements
Rank 1
answered on 20 Nov 2009, 11:45 AM

Hi Dimitrina

I am using Raddocpane in my project.

1. I have a coverflow in one radpane. when i select office_silver the coverflow is disappearing.
2. Inside each radpane i am using canvas. canvas is not getting applied with the runtime themes.
2. Silverlight datagrid is not reflecting the themes.
4. Pager is not reflecting the themes.

 

Please give me a suggestion.

Regards
Chitra K

0
Hristo
Telerik team
answered on 23 Nov 2009, 11:21 AM
Hi Chitra Krishnan,

We do not provide themes for Microsoft Silverlight DataGrid or Pager controls. This is why nothing happens to them when the theme is changed.
Could you send us sample project demonstrating the disappearing RadConverFlow?

Best wishes,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Bhargavi Kanchi
Top achievements
Rank 1
answered on 24 Nov 2009, 04:02 AM
Can you please let me know how to change the theme of a RadComboBox having the options for the user to select the themes.?

Here is my code and I want to set the Theme for cmbThemes also?

 

 

<input:RadComboBox x:Name="cmbThemes" Canvas.Top="0" Height="15"

 

Width="150" SelectionChanged="cmbThemes_SelectionChanged"

 

 

 

FontSize="10" > 

 

 

 

<ctr:Office_BlueTheme />
<ctr:Office_SilverTheme/>

 

 

 

<ctr:SummerTheme/>

 

 

<ctr:VistaTheme/>
<ctr:Windows7Theme/>

 

 

</input:RadComboBox>

In Selection Changed Event, I am setting the ThemeProperty to the Selected Value of the Combo.
Theme of Combobox is getting changed ,but all the events in the page are getting cancelled off which is not allowing me to do
anything on the page.

Please provide the information....

 

 

 

 

 

 

 

 

 

 

0
Hristo
Telerik team
answered on 24 Nov 2009, 10:55 AM
Hello Bhargavi Kanchi,

You can do it in code (like you did) or you can Bind ThemeProperty to RadComboBox.SelectedItem. This way there will be no code.
<input:RadComboBox x:Name="cmbThemes" Canvas.Top="0" Height="15" Width="150" FontSize="10" ctr:StyleManager.Theme={Binding SelectedItem, ElementName=cmbThemes}> 
   <ctr:Office_BlueTheme />  
   <ctr:Office_SilverTheme/>  
   <ctr:SummerTheme/>  
   <ctr:VistaTheme/>  
   <ctr:Windows7Theme/>  
</input:RadComboBox>

If there are other controls you can use the same binding for them so that they will change their themes if comboBox theme is changed.

I do not understand what do you mean with "all the events in the page are getting cancelled off".
Could you elaborate more on this? A sample project demonstrating the problem will be very helpful

Kind regards,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Bhargavi Kanchi
Top achievements
Rank 1
answered on 25 Nov 2009, 05:02 AM
Hi Hristo ,

When changing the theme for Even Themes radCombo, then
all the events of the Controls are not working. I am not able to select , click, and enter text for the Controls.
I am not able to attach the project file..It is allowing .gif,.jpg,.jpeg,.png..


Thanks,
Bhargavi.
0
Hristo
Telerik team
answered on 25 Nov 2009, 01:43 PM
Hi Bhargavi Kanchi,

In order to attach files you should open a support thread.

Regards,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Chitra Krishnan
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Chitra Krishnan
Top achievements
Rank 1
Hristo
Telerik team
Bhargavi Kanchi
Top achievements
Rank 1
Share this question
or