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

Theming/Styling

3 Answers 41 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
caleb
Top achievements
Rank 1
caleb asked on 29 Nov 2016, 11:51 AM

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

3 Answers, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 02 Dec 2016, 08:47 AM
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.
0
caleb
Top achievements
Rank 1
answered on 02 Dec 2016, 12:42 PM

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

0
caleb
Top achievements
Rank 1
answered on 02 Dec 2016, 01:36 PM

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

Tags
Spreadsheet
Asked by
caleb
Top achievements
Rank 1
Answers by
Tanya
Telerik team
caleb
Top achievements
Rank 1
Share this question
or