Docking theming issus

5 posts, 0 answers
  1. Marc
    Marc avatar
    1 posts
    Member since:
    Mar 2011

    Posted 27 May 2011 Link to this post

    Hello,

    I'm trying to build a custom theme to apply a Windows7 based theme.

    I follow all the steps here http://www.telerik.com/help/silverlight/common-styling-apperance-themes-custom-theme-project-telerik-approach.html , and as I add the Docking.xaml theming file to my custom theme project, VS2010 says that the Telerik.Windows.Controls.Animations is not include in the assembly Telerik.Windows.Controls.Docking (v2011.1.516.1040) although the build succeeded.

     

     

    xmlns:telerikDockingAnimations="clr-namespace:Telerik.Windows.Controls.Animations;assembly=Telerik.Windows.Controls.Docking"

     

     

     

     

    I wonder if this could be a reason for the error I got when lauching my solution. Pointing the InitializeComponent() in my mainpage.xaml.cs :

    L'exception System.Windows.Markup.XamlParseException s'est produite
      Message=La propriété Set 'System.Windows.FrameworkElement.Style' a levé une exception. [Line: 50 Position: 109]
      LineNumber=50
      LinePosition=109
      StackTrace:
           à System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
           à SpaceX.MainPage.InitializeComponent()
           à SpaceX.MainPage..ctor()
      InnerException: System.Windows.Markup.XamlParseException
           Message=La propriété Set 'Telerik.Windows.Controls.Theme.ApplicationThemeSetter' a levé une exception. [Line: 11 Position: 69]
           LineNumber=11
           LinePosition=69
           StackTrace:
                à MS.Internal.XcpImports.CreateFromXaml(UnmanagedMemoryStream stream, String sourceAssemblyName, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers, String xamlResourceUriString)
                à System.Windows.Controls.Control.GetBuiltInStyle(IntPtr nativeTarget, IntPtr& nativeStyle)
           InnerException: 
                Message=Une erreur HRESULT E_FAIL a été retournée à partir d'un appel à un composant COM.
                StackTrace:
                     à MS.Internal.XcpImports.CheckHResult(UInt32 hr)
                     à MS.Internal.XcpImports.SetValue(IManagedPeerBase obj, DependencyProperty property, String s)
                     à MS.Internal.XcpImports.SetValue(IManagedPeerBase doh, DependencyProperty property, Object obj)
                     à System.Windows.DependencyObject.SetObjectValueToCore(DependencyProperty dp, Object value)
                     à System.Windows.DependencyObject.SetEffectiveValue(DependencyProperty property, EffectiveValueEntry& newEntry, Object newValue)
                     à System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
                     à System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
                     à System.Windows.ResourceDictionary.set_Source(Uri value)
                     à Telerik.Windows.Controls.Theme.CreateResourceDictionaryForApplicationTheme(Theme theme, String controlAssembly)
                     à Telerik.Windows.Controls.Theme.AddMergedDictionaryFromApplicationTheme(ResourceDictionary generic, String assemblyName)
                     à Telerik.Windows.Controls.Theme.OnApplicationThemeSetterChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
                     à Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)
                     à System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
                     à System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
                     à System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
                     à System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
                     à Telerik.Windows.Controls.Theme.SetApplicationThemeSetter(DependencyObject obj, String value)
                InnerException: 

    I'm using Silverlight beta 5, and can not go back to sl4 because of a 'CreateRiaClientFilesTask / missing ClientFrameworkPath' error. Shouldn't it work with sl5 ? 

    Any idea ?

    Thanks,

    Marc.

  2. Don
    Don avatar
    2 posts
    Member since:
    Nov 2010

    Posted 31 May 2011 Link to this post

    I've recently upgraded to the latest Telerik Silverlight Control Library and I am seeing a similar issue.  For some reason the Silverlight application is unable to reference the uri that the Telerik.Windows.Controls.Theme.GetCachedResourceDictionary() tries to use.  Are we suppose to be setting up our derived Theme classes differently now?  I tried dropping the class attribute [ThemeLocation(ThemeLocation.BuiltIn)] and I get the same behavior when Telerik tries to resolve '/MyThemes;component/Themes/Generic.xaml'.  I have looked at the Silverlight Application XAP and the assembly that has the custom theme in it is there.  Setting the RadRibbonBar theme to the Windows7Theme with the StyleManager.Theme setter works just fine.  I have included a stack trace that may help.


       {System.Windows.Markup.XamlParseException: Failed to assign to property 'System.Windows.Setter.Value'. [Line: 5 Position: 36] ---> System.InvalidOperationException: A ResourceDictionary '/MyThemes;component/Themes/Telerik.Windows.Controls.RibbonBar.xaml' cannot be found. Please make sure that references to the needed theme assemblies have been added to the project. ---> 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(IManagedPeerBase obj, DependencyProperty property, String s)
          at MS.Internal.XcpImports.SetValue(IManagedPeerBase doh, DependencyProperty property, Object obj)
          at System.Windows.DependencyObject.SetObjectValueToCore(DependencyProperty dp, Object value)
          at System.Windows.DependencyObject.SetEffectiveValue(DependencyProperty property, EffectiveValueEntry& newEntry, Object newValue)
          at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
          at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
          at System.Windows.ResourceDictionary.set_Source(Uri value)
          at Telerik.Windows.Controls.Theme.GetCachedResourceDictionary(Uri uri)
          --- End of inner exception stack trace ---
          at Telerik.Windows.Controls.Theme.GetCachedResourceDictionary(Uri uri)
          at Telerik.Windows.Controls.Theme.GetResourceFromTheme(Theme theme, String controlAssembly, Type defaultStyleKeyType, Theme controlTheme)
          at Telerik.Windows.Controls.Theme.GetResourceValue(Type defaultStyleKey, Theme theme, Theme controlTheme)
          at Telerik.Windows.Controls.Theme.GetThemeStyle(Theme oldTheme, Type defaultStyleKey)
          at Telerik.Windows.Controls.Theme.Apply(FrameworkElement element, Theme oldTheme)
          at Telerik.Windows.Controls.StyleManager.OnThemeChanged(DependencyObject target, DependencyPropertyChangedEventArgs changedEventArgs)
          at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)
          at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
          at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
          at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
          at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
          at Telerik.Windows.Controls.StyleManager.SetTheme(DependencyObject element, Theme value)
          --- End of inner exception stack trace ---
          at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
          at SilverlightApplication1.MainPage.InitializeComponent()
       at SilverlightApplication1.MainPage..ctor()}
  3. DevCraft banner
  4. Pana
    Admin
    Pana avatar
    748 posts

    Posted 01 Jun 2011 Link to this post

    Hello Don,

    We have not yet tested well our controls with future SL5 builds so custom themes may have some problems. We have plan to change the theming mechanism and relay purely on Implicit styles in future. HRESULT errors are thrown in runtime when there is invalid xaml but as some XAML specifications have changed from SL3 to SL4 I believe we may expect such issues upgrading from SL4 to SL5. We are waiting the release of SL5 official runtime to release SL5 binaries that will be compliant with SL5.

    Best wishes,
    Pana
    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
  5. Don
    Don avatar
    2 posts
    Member since:
    Nov 2010

    Posted 01 Jun 2011 Link to this post

    I apologize, I did not see that Marc was running SL5.  I'm currently running SL4.  Can you think of any reason why my custom style would not be working because of the upgrade I made?

    Thanks,
    Don
  6. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 06 Jun 2011 Link to this post

    Hi,

    It appears your RibbonBar dictionary is no more valid and fails to load causing the can-not-locate error. It would be best to open a support thread or a forum post for the RadRibbonBar and point the version you are upgrading from and to. If you can send us a small sample illustrating your scenario, we will be able to isolate the issue and help you get over it.

    You can also keep the communication here but I do not believe it is a docking theming issue.

    Best wishes,
    Tina Stancheva
    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
DevCraft banner