Hi,I've copied the RoyalLight theme files into my own theme directory in my project solution with the intent to edit theme for our custom theme, but there are several xmlns items and I'm not sure how/where to reference from. xmlns:inputToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit" xmlns:inputToolkitPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Input.Toolkit" xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit" xmlns:layoutToolkitPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Layout.Toolkit"xmlns:vsm="clr-namespace:System.Windows;assembly=WPFToolkit"
xmlns:inputToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
xmlns:inputToolkitPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Input.Toolkit"
xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"
xmlns:layoutToolkitPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Layout.Toolkit"
xmlns:vsm="clr-namespace:System.Windows;assembly=WPFToolkit"
The specific error (as an example) for <Style x:Key="RatingItemStyle" TargetType="{x:Type inputToolkit:RatingItem}">
<Style x:Key="RatingItemStyle" TargetType="{x:Type inputToolkit:RatingItem}">
is
Error XDG0008 The name "RatingItem" does not exist in the namespace "clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit". [Redacted].MSControls.Toolkit.Implicit.xaml 46
Hi Matthew,
Thank you for posting to Infragistics Community!
I have been looking into your question and according to the MS Controls Implicit Themes topic in our documentation, the resource dictionaries that have to be copied in your app would be RoyalLight.MSControls.Core.Implicit, RoyalLight.MSControls.Toolkit.Implicit, as well as their dependencies Styles.Shared.xaml, Styles.WPF.xaml, Theme.Colors.xaml. For the Infragistics controls, there are other correspondignly named dictionaries in the Themes directory.
After further investigation, I determined that the missing reference causing the error is the WPFToolkit. More information about it can be found on the following link - https://www.nuget.org/packages/WPFToolkit/. However, it seems it does not appear when searching for it in the NuGet Package manager for Solution Window in Visual Studio. So, it can be installed through the Package Manager Console with the following command:
NuGet\Install-Package WPFToolkit -Version 3.5.50211.1
Additionally I created a small sample testing these resource dictionaries added. On my side installing the WPFToolkit package resolves the errors.
Please, test this suggestion on your side and let me know if you need any further assistance on the matter.
Best regards, Bozhidara Pachilova Associate Software Developer
TestRoyalLightStyles.zip
Thank you! :) The root of the problem however was I used dnSpy to grab the resources out of the libraries, rather than copy them from the provided files and then extended the theme like so.
public class HscmTheme : RoyalLightTheme{ protected override void ConfigureControlMappings() { base.ConfigureControlMappings(); var assemblyFullName = typeof(HscmTheme).Assembly.FullName; Mappings[ControlMappingKeys.XamDataGrid] = BuildLocationString(assemblyFullName, @"/Resources/Themes/Hscm/DataPresenterHscm_Brushes.xaml"); Mappings[ControlMappingKeys.XamDataGrid] = BuildLocationString(assemblyFullName, @"/Resources/Themes/Hscm/DataPresenterHscm_Express.xaml"); Mappings[ControlMappingKeys.XamDataGrid] = BuildLocationString(assemblyFullName, @"/Resources/Themes/Hscm/DataPresenterHscm.xaml"); Mappings[ControlMappingKeys.XamMenu] = BuildLocationString(assemblyFullName, @"/Resources/Themes/Hscm/XamMenuHscm.xaml"); }}
Hello Matthew,
I am glad you were able to resolve the issue. Thank you for using Infrgagistics components!
Best regards,
Bozhidara Pachilova