Themes throwing exceptions ...

3 posts, 0 answers
  1. Pedro
    Pedro avatar
    22 posts
    Member since:
    Apr 2008

    Posted 27 Jan 2010 Link to this post

    Hi, in my local machine all themes work fine, but on some XP and Vista machines the application is throwing errors when I set the global theme like this:
    StyleManager.ApplicationTheme = new SummerTheme(); 
    in the app.xaml.cs in the start up event.
    Any ideas why this is happening?
    this is the error:

    {System.Exception: Error HRESULT E_FAIL has been returned from a call to a COM component. 
      at MS.Internal.XcpImports.CheckHResult(UInt32 hr) 
      at MS.Internal.XcpImports.SetValue(INativeCoreTypeWrapper obj, DependencyProperty property, String s) 
      at MS.Internal.XcpImports.SetValue(INativeCoreTypeWrapper doh, DependencyProperty property, Object obj) 
      at System.Windows.DependencyObject.SetObjectValueToCore(DependencyProperty dp, Object value) 
      at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isSetByStyle, Boolean isSetByBuiltInStyle, PropertyInvalidationReason reason) 
      at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value) 
      at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) 
      at System.Windows.ResourceDictionary.set_Source(Uri value) 
      at Telerik.Windows.Controls.Theme.CreateResourceDictionaryForApplicationTheme(Theme theme, String controlAssembly) 
      at Telerik.Windows.Controls.StyleManager.OnApplicationThemeChanged(Theme oldValue, Theme newValue) 
      at Telerik.Windows.Controls.StyleManager.set_ApplicationTheme(Theme value) 
      at Edupoint.Client.ClassBoard.App.Application_Startup(Object sender, StartupEventArgs e) 
      at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args) 
      at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)}

  2. Dimitrina
    Admin
    Dimitrina avatar
    442 posts

    Posted 28 Jan 2010 Link to this post

    Hello Pedro,

    Unfortunately, we were not able to reproduce the error you've encountered.

    Please, find the attached file and compare it with your project


    Best wishes,
    Dimitrina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Pedro
    Pedro avatar
    22 posts
    Member since:
    Apr 2008

    Posted 03 Feb 2010 Link to this post

    Hi,
    I solved the problem, I still does not know why is happening this, but at least I know how to fix it, the problem was the source control client,  when I got the latest version on windows 7 all the references are satisfied properly, but when I download the code from XP or Vista, the references to the theme dlls are not found, this is weird since all the telerik dlls are in the same folder and only the theme's dlls are not found, removing the references and adding again fixes the problem.
    What is odd to me, is that the SummerTheme Class is not in the same dll than the theme it self, thats why the code was compiling but throwing exceptions at run time, having the SummerTheme class in the same dll would help with cases like this, but I guess there is a reason for having it separated.


Back to Top