We have been looking to upgrade the version of infragistics that we use in our WPF project, but I am unsure of the best way to go about retaining the same style's that we had before the upgrade.
In our build we use BasedOn to create our own business specific controls. For example:
xmlns:igDP="">infragistics.com/DataPresenter"
<Style TargetType="{x:Type ems:EmsDataGrid}" BasedOn="{StaticResource {x:Type igDP:XamDataGrid}}"> <Setter Property="Background" Value="#74FFFFFF" /> <Setter Property="GroupByAreaLocation" Value="None" /> <Setter Property="IsUndoEnabled" Value="True" /></Style>
Since we base our (ems) controls off of the default infragistics controls, when the default styling switched between the two versions all of our controls changed pretty drastically.I see the IGTheme in version 18.2 is pretty similar to what the default style in 16.1 was,but I am unsure of a good way to implement the theme because if I apply the theme before the control's definition it will just get overwritten by the default,but if I apply the theme after it will overwrite the default AND the custom additions that we have added.Only similar question that I found that didn't have an answer:Link to Question
Hello Shane,
Thank you for posting.
As you already aware that from version 16.1 to 18.2 we don’t changes in the themes.
But if you have made some custom changes and wants to retain the same, you can simply copy these files from version 16.1 and paste it into 18.2.
And copy pasting the files ,depends on which file and for which control you have made changes .
For example in XamDataGrid case you would have used the style in the DataPresenter folder(DataPresenterGeneric_Express.xaml file) so you can copy/paste this file.
Please let me know if this is what you were asking or I am missing something.
Sincerely,Divya JainAssociate Software Developer
So from 16.1 (right on image) to 18.2 (left on image)
the default style on all of the controls changed. I think I read this was done to minimize the weight of the default controls while still allowing for users to theme the controls if desired, but the way we inherit from the controls (example in previous post) I don't know if there is a way for us to apply one of the Themes before we apply our own custom styles without doing a bunch of rewriting.
Edit: After looking I see that this was most likely done between 17.1 -> 17.2
Thank you for the update.
Looking at the images you provided you dint compare the ‘default theme’ of V16.1 to V18.2.
Anyways In order to find the changes been made from V161 to B18.1 you can refer to ‘Whats New 2016 valume2’ link. I did find some design changes been made , we redesigned the defaults of the xamDataChart, xamPieChart, xamDoughnutChart, xamFunnelChart, xamRadialGauge, xamLinearGauge, xamBulletGraph and xamSparkline controls , which you can find in the doc.
And in that case you have to re-write your custom logic (its really depends on what you are styling)
https://www.infragistics.com/help/wpf/whats-new-in-2016-volume-2
Please let me know if you need further assistance.
Sincerely,
Divya Jain
Associate Software Developer
Sorry about that confusion. I did that because the default theme for the controls that were redesigned (listed by you above and in link) in 16.2 match very closely to the Royal Light Theme from what I can tell, whereas the default theme controls in 16.1 match the Infragistics Theme very closely.
So going forward to version 18.2 my group will need to use the Infragistics Theme to retain the blues, reds and generally darker colors that were also part of the default theme in 16.1 because starting in 16.2 the default theme color pallet changed for these controls and the way we were creating custom controls based on the default controls won't allow for us to easily apply the Infragistics theme before our custom additions
Do you have any code examples that would show creating a custom style after applying a theme to the default control?
Hello ,
You can find the default theme for all the controls here :
C:\Program Files (x86)\Infragistics\2018.1\WPF\Themes\IG
If you know the custom changes you have made in version 16.2 then the same changes you have to make it for version 18.2 default files.
You can add these files of version18.2 locally in your project and make the changes for each element you have changed for 16.2. and add them into your project using MergedDictionaries like this.
You can also refer to this document discusses the theme files and how to merge theme.
<Grid><Grid.Resources > <ResourceDictionary><ResourceDictionary.MergedDictionaries><ResourceDictionary Source="Filename.xaml"/></ResourceDictionary.MergedDictionaries></ResourceDictionary> </Grid.Resources> </Grid>
You can also refer to this post explaining how to modify the office2013 style for theXamRibbon, I am sure its not what you are doing but the concept is same,
You have to change the default theme of your control and merge them using the MergedDictionaries. In Your case you already know which element/key you have changed for 16.2 , the same you have to change it for 18.2.