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

Vista theme issue

3 Answers 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jerome
Top achievements
Rank 1
Jerome asked on 07 Jul 2009, 08:44 AM
Hi,

I'm currently busy upgrading our application to the latest Telerik Silverlight controls (Q2).

After replacing the .DLL's in the solution and fixed the first batch of breaking changes
(e.g. RadWindow) the application starts with the default Black theme instead of the
Vista theme.

The vista theme is declared in the App.Xaml.CS with the following code:

public App ( )  
{  
    this.Startup += this.Application_Startup;  
    this.Exit += this.Application_Exit;  
    this.UnhandledException += this.Application_UnhandledException;  
 
    Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo ( "nl-NL" );  
    Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo ( "nl-NL" );  
 
    Telerik.Windows.Controls.StyleManager.ApplicationTheme = new Telerik.Windows.Controls.VistaTheme ( );  
 
    InitializeComponent ( );  
}  
 

I looked in the reference folder of the Silverlight application and can see the
Telerik.Windows.Themes.Vista has version 2009.2.701.1020

Any suggestions why the correct theme is no longer applied after the
upgrade to Q2?

Kind regards,

Jerome

3 Answers, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 10 Jul 2009, 11:39 AM
Hello Jerome,

 I tested with a very simple application and the theme was applied correctly. The application themes are not applied when there is a wrong theme XAML or some of the theme Style target types throws an exception. It is possible that there is a bug in the theme of one control, which prevents the whole theme from loading. Can you please, list here the Telerik assemblies you are using in your application?

Also if you have a reference to Telerik.Windows.Data.dll you may need to add a reference to System.Windows.Controls.Data.dll that is in the Telerik Binaries folder. RadGridView is using a newer version of System.Windows.Controls.Data.dll that is not installed with Silverlight 2 by default, hence the need of this assembly. An older version of System.Windows.Controls.Data.dll may cause the problem with the themes.


All the best,
Boyan
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
sunu
Top achievements
Rank 1
answered on 25 Aug 2009, 06:55 AM
hi
I am a newcomer to telerik controls and currently I was trying to apply themes for menu control. I have read the previous comment in this thread and followed the steps as per your instructions. But my default theme is not changing even if I  followed your steps. Can you please look into my code and let me know your comments reg this. Also, if you have any sample projects, please upload it so that I can refer them. 

 public App()  
        {  
            this.Startup += this.Application_Startup;  
            this.Exit += this.Application_Exit;  
            this.UnhandledException += this.Application_UnhandledException;  
            Telerik.Windows.Controls.StyleManager.ApplicationTheme = new Telerik.Windows.Controls.SummerTheme();  
            InitializeComponent();  
              
        } 
Regards
Sunu
0
Valeri Hristov
Telerik team
answered on 26 Aug 2009, 09:11 AM
Hi sunu,

Your code looks correct, I suppose that you are missing a reference. Could you please, check if you have a reference Telerik.Windows.Themes.Summer.dll? Our Silverlight themes are placed in separate assemblies and you need to reference the corresponding assembly before you apply a theme. Also you could check if the version numbers of the Telerik assemblies in your application are the same - I strongly recommend using the latest service pack assemblies with version 2009.2.812.1030.

All the best,
Valeri Hristov
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.
Tags
General Discussions
Asked by
Jerome
Top achievements
Rank 1
Answers by
Boyan
Telerik team
sunu
Top achievements
Rank 1
Valeri Hristov
Telerik team
Share this question
or