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

3 posts, 0 answers
  1. Andy
    Andy avatar
    3 posts
    Member since:
    Jun 2011

    Posted 20 Dec 2011 Link to this post


    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. Andy
    Andy avatar
    3 posts
    Member since:
    Jun 2011

    Posted 21 Dec 2011 Link to this post

    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");
    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
  3. Peter
    Peter avatar
    1157 posts

    Posted 23 Dec 2011 Link to this post

    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.

    the Telerik team

    of RadControls for WinForms is available for download (see what's new). Get it today.
Back to Top