Applying themes in 504 with DataGrid reference.

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 10 years ago by JDEV
Version: 9.1.0504
Avatar

Upgraded to 504. Everything works fine.

Then added references to DataGrid.Contrib.Wpf351 and Editors.Interop.DataGrid.Wpf351.

Now (and without actually using DataGrids) we get an exception on our code line:

ActiproSoftware.Windows.Themes.ThemeManager.CurrentTheme = ActiproSoftware.Windows.Themes.CommonThemeName.Office2007Black.ToString();

Exception message is:
'Office2007Common.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. 'PinGlyphs.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Exception has been thrown by the target of an invocation. Error at object 'System.Windows.Markup.StaticExtension' in markup file 'ActiproSoftware.DataGrid.Contrib.Wpf351;v9.1.504.0;component/Themes/DataGrid/PinGlyphs.xaml'. Error at object 'System.Windows.ResourceDictionary' in markup file 'ActiproSoftware.DataGrid.Contrib.Wpf351;v9.1.504.0;component/Themes/DataGrid/Office2007Common.xaml'. Error at object 'System.Windows.ResourceDictionary' in markup file 'ActiproSoftware.DataGrid.Contrib.Wpf351;v9.1.504.0;component/Themes/DataGrid/Office2007Black.xaml'.

Any ideas would be appreciated.

Comments (4)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Which operating system do you run? I'm not seeing it happen.

Perhaps you could email over a simple sample project that shows it happening and please indicate which operating system and theme you are in.


Actipro Software Support

Posted 10 years ago by JDEV
Avatar
Windows Vista with Aero.

I'll have to build a sample project.
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We did some more tests and was able to reproduce this on a system that does not have .Net 3.5 SP1, which is required for the DataGrid.Contrib project.

This may also occur if the DataGrid.Contrib cannot find the WPFToolkit.dll assembly. You would need to make sure that your application references the correct version of the WPFToolkit, to correct this.


Actipro Software Support

Posted 10 years ago by JDEV
Avatar
Thanks.

It was an old version of toolkit that caused the problem.

The June 2009 release of wpftoolkit.dll solved this.
The latest build of this product (v2018.1 build 0675) was released 12 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.