Theming/Styling

4 posts, 0 answers
  1. caleb
    caleb avatar
    31 posts
    Member since:
    Sep 2011

    Posted 29 Nov 2016 Link to this post

    Hello there,

    I've got version v2016.2.613.1050 of the Silverlight controls.  I'm trying to style a Spreadsheet using the VisualStudio2013 theme.  When I add:

    <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Spreadsheet.xaml"/>

    The code generates an error:

     

       at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
       at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
       at System.Windows.UIElement.UpdateLayout()
       at Telerik.Windows.Controls.Spreadsheet.Controls.StyleGalleryManager.TakeSnapshot(CellStyle[] cellStyles)
       at Telerik.Windows.Controls.Spreadsheet.Controls.StyleGalleryManager.UpdateInvalidatedItemsSnapshot(List`1 items)
       at Telerik.Windows.Controls.Spreadsheet.Controls.StyleGalleryManager.UpdateSnapshots(List`1 items)
       at Telerik.Windows.Controls.Spreadsheet.Controls.StyleGalleryManager.SnapshotRadSpreadsheet_Loaded(Object sender, RoutedEventArgs e)
       at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)

     

    This looks like a Telerik internal issue.  Can you review this and let me know how to solve?

     

    Thanks so much,

     

    Caleb

  2. Tanya
    Admin
    Tanya avatar
    506 posts

    Posted 02 Dec 2016 Link to this post

    Hi Caleb,

    This error is usually observed when a required XAML file is not merged in the resource dictionary. Can you please verify that you have added all the resources for the dependencies of RadSpreadsheet? The following code shows all the dictionaries you should have in order to use the theming mechanism:
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/System.Windows.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Input.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.GridView.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.RibbonView.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Spreadsheet.xaml" />
    </ResourceDictionary.MergedDictionaries>

    Hope this helps.

    Regards,
    Tanya
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. caleb
    caleb avatar
    31 posts
    Member since:
    Sep 2011

    Posted 02 Dec 2016 in reply to Tanya Link to this post

    Hello there,

     

    I've verified that the requested dependencies are in place.  The error remains.  Anything else I should look for?

    Thanks so much,

    Caleb

  4. caleb
    caleb avatar
    31 posts
    Member since:
    Sep 2011

    Posted 02 Dec 2016 in reply to caleb Link to this post

    Hello there,

    I've downloaded the sample code from github, added the VisualStudio2013 dll, merged in the above files and getting the same error.  Looks like some sort of issue with the xamls. 

    Cheers,

    Caleb

Back to Top