Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
430
Referencing Styles Within IG DLLs
posted

Forgive me if this question is answered already or documented elsewhere, but I have yet to find an answer.

Backstory:

I'm using the IG theme in my application. I wish to make a very small modification to the XamComboEditor template. I have found the template for it in "C:\Program Files (x86)\Infragistics\2015.1\WPF\Themes\IG\IG.xamComboEditor.xaml". Upon copying the template into my application for some modifications I get build errors on the brushes and colors used by the template.

Now, I know I can just copy the necessary xaml files into my application and reference them via a MergedDictionary, but I can't help but feel that there is a more elegant solution.

Now, I have a class library with some controls and shared styles in it. In order to use that in my primary application, I merely add the following at the top of my user control.

            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/CommonLibrary;component/Themes/CommonStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>

My question is, is this possible with the IG DLLs? My attempts at it have failed thus far. Is there perhaps a more elegant solution?

Here's what I'm hoping to do in order to get access to the brushes and colors for the theme:

            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/CommonLibrary;component/Themes/CommonStyles.xaml" />
                <ResourceDictionary Source="/InfragisticsWPF4.Themes.IG.v15.1;component/Themes/IG/Styles.Shared.xaml" />
            </ResourceDictionary.MergedDictionaries>

Or do I need to do something like the following?

<ResourceDictionary Source="pack://application:,,,/InfragisticsWPF4.Themes.IG.v15.1;component/Themes/IG/Styles.Shared.xaml" />

Is there a way to do it that is agnostic of the version? Or does the version utility find and upgrade such lines?