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

Themes in a Silverlight Business Application

4 Answers 172 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 21 Feb 2010, 09:52 PM
Hello,
I am using VS 2010 Beta 2, SL4, Telerik Q1 2010 beta and the Telerik Reporting Q3 2009.  I run the CSharp Silverlight Reporting sample and can change themes using the dropdown control box.  I've copied the MainPage.xaml/cs code into the Home page of my Business app and all works as expected except the themes do not change.  I have verified that all code is identical and all the necessary assemblies are referenced.  The only differences that I can determine is that my Home page is derived from Page rather than UserControl and that there are several System assemblies referenced that are not referenced in the Reporting demo.  Is anyone aware of incompatibilities with the Silverlight Business Application that would cause theming to fail?

Thanks,
Steve Johnson

4 Answers, 1 is accepted

Sort by
0
Steve
Top achievements
Rank 1
answered on 23 Feb 2010, 08:20 PM
Just to add a little info.  I was able to assign a theme to the StyleManager.ApplicationTheme in the constructor for my app.  After that, no luck.

        public App()  
        {  
            StyleManager.ApplicationTheme = new Windows7Theme();  
            InitializeComponent();  
        }  
 
0
Pana
Telerik team
answered on 25 Feb 2010, 07:28 AM
Hello Steve,

Application themes are not supposed to be changed runtime. The application theme is applied to the controls when they are created and if you want to affect your application you will have to remove all control instances and recreate them.

Or you can bind the telerik:StyleManager.Theme property on each control to somewhat combobox and change the themes via that combobox's selected item. This will require some extra effort -you will have to put the binding on every existing control in your application.

I believe our demos recreate the pages when the theme changes.

Sincerely yours,
Panayot
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.
0
Steve
Top achievements
Rank 1
answered on 25 Feb 2010, 05:37 PM
Hi Panayot,
If you read my original post you'll see that I refer to the working code from the Silverlight ReportViewer sample from the Telerik Reporting Q3 2009 beta that changes the theme of the viewer during runtime via combobox.  I copied the code from the MainPage.xaml/cs to the HomePage.xaml/cs of my Silverlight Business Application and although I can change the selected item in the combobox it has no effect on the ReportViewer.  There in lies my problem.  Identical code works in the Telerik sample application and doesn't work when ported to a Silverlight Business Application. So, as I stated in my original post, the only differences that I can determine is that my Home page is derived from Page rather than UserControl and that there are several System assemblies referenced that are not referenced in the Reporting demo.  Is anyone aware of incompatibilities with the Silverlight Business Application that would cause theming to fail?
Thanks,
Steve
0
Pana
Telerik team
answered on 04 Mar 2010, 01:54 PM
Hello Steve,

I'm sorry but I can not give you further directions. Can you send us your project so we can eventually take a look and fix the problem for you?

Regards,
Panayot
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.
Tags
General Discussions
Asked by
Steve
Top achievements
Rank 1
Answers by
Steve
Top achievements
Rank 1
Pana
Telerik team
Share this question
or