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

Error applying theme - only on Windows 7 x64 running Office x64

2 Answers 133 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 20 Dec 2011, 06:10 PM
Hi,

I have built a VSTO project for Office using the RadTreeView and Windows7 theme from Q1 2010 SP2 (not the latest I know). I have inherited from the Telerik tree so I can implement some WinAPI interfaces but I am using the RadTree base class for all my UI and setting it's theme to Windows 7 via the properties pane in VS.
Up until today I've been deploying my project succesfully via msi to all sorts of Windows/Office configurations, everything installs and runs perfectly and the tree looks excellent and performs exactly as I want.
However I've just tried to install on Windows 7 x64 running Office 2010 x64. My project loads correctly as always but when the constructor for the tree is called I get the following error on InitializeComponent() -

System.ArgumentException: Specified resource does not exist in the provided assembly.
   at Telerik.WinControls.ThemeResolutionService.LoadPackageResource(ResourceParams resourceParams, Boolean throwOnError)

Exactly the same dll works fine against Office 2010 x32 on a Windows 7 x64 OS. And indeed on every Windows Vista/XP Office2010/2007 combination I've tried so far. Only the 64 bit Windows / 64 bit Office combination gives me this.

I can't debug it, if I debug it loads fine. If I load the same dll without debugging I always get the error. Could it be something to do with timing, the order the assemblies are loaded etc? Why is the theme not available only in these circumstances?

Any ideas would be hugely appreciated, seems very strange to me,

Thanks in advance for any replies...

2 Answers, 1 is accepted

Sort by
0
Andy
Top achievements
Rank 1
answered on 21 Dec 2011, 12:25 PM
I managed to get around this by deleting the the theme from the form.
I used the Visual Style Builder to export the relevant .tssp file and saved this in my project.
Calling -
string tssp = Path.Combine(InstallResources + "Windows7.tssp");
Telerik.WinControls.ThemeResolutionService.LoadPackageFile(tssp);
ThemeName = "Windows7";
in the contructor makes everything work ok.

Really odd that I can't just let the built in Theme handling take care of it when running 64 bit though
0
Peter
Telerik team
answered on 23 Dec 2011, 11:15 AM
Hello Andy,

Thank you for reporting this to us.

We have never experienced a similar issue before. I can assume that this theme applied some font (I do not know exactly which) that does not exist in this OS. Probably Office installation replaces the font that our theme tries to apply to our elements.

Thank you again for reporting and excuse us for the inconvenience.

Greetings,
Peter
the Telerik team

Q3’11
of RadControls for WinForms is available for download (see what's new). Get it today.
Tags
Themes and Visual Style Builder
Asked by
Andy
Top achievements
Rank 1
Answers by
Andy
Top achievements
Rank 1
Peter
Telerik team
Share this question
or