Themes in a Silverlight Business Application

5 posts, 0 answers
  1. Steve
    Steve avatar
    7 posts
    Member since:
    May 2009

    Posted 21 Feb 2010 Link to this post

    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
  2. Steve
    Steve avatar
    7 posts
    Member since:
    May 2009

    Posted 23 Feb 2010 Link to this post

    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();  
            }  
     
  3. Pana
    Admin
    Pana avatar
    748 posts

    Posted 25 Feb 2010 Link to this post

    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.
  4. Steve
    Steve avatar
    7 posts
    Member since:
    May 2009

    Posted 25 Feb 2010 Link to this post

    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
  5. Pana
    Admin
    Pana avatar
    748 posts

    Posted 04 Mar 2010 Link to this post

    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.
Back to Top