Hi,
Im trying to customize the RoyalLightTheme. Basically i just want to change the Accent Color to blue and add a custom validation look to some editors.
I added some of the dictionaries in "\Infragistics\2019.2\WPF\Themes\RoyalLight" to my project and linked them via the Mappings. I got it working with some standard microsoft controls and the xamComboEditor. Im extending the theme as described in www.infragistics.com/.../thememanager-extending-existing-control-themeI have several questions.
1. Are all the styles that i need in the "\Infragistics\2019.2\WPF\Themes\RoyalLight folder or are some in "Infragistics\2019.2\WPF\DefaultStyles" ?
2. I saw there is a "ControlMappingKeys.XamDataGrid". What dictionary maps to this? There is none called xamDataGrid. How do i find this out myself?
3. Same as 2 but for more simple editors like XamTextEditor. There is only 1 dictionary "RoyalLight.xamEditors.xaml", but several keys in the ControlMappingKeys enum.
4. I added the RoyalLight.xamGrid.xaml dictionary to my project (hoping its the one for the xamDataGrid), but its full of errors. All looking like this "The name "CultureValueConverter" does not exist in the namespace "">schemas.infragistics.com/.../primitives". What do i do?5. Some dictionaries like the RoyalLight.xamEditors.xaml just look like this: Code I found those in "DefaultStyles/Windows", do i need to edit this, add them to my project, and reference those instead? All for a simple color change on xamTextEditor?
6. Is this even a "feasible" idea? It worked quickly with the sample and the xamComboEditor, but now it looks like i need to really dive into this and the first dictionary depends on another dictionary which depends on 2 dictionaries that are hidden within the general dictionaries which need primitive dictionaries...7. I could remember this wrong, but the first time i played around with this, i think there were typos in some of the dictionaries. Is there a clean version i can download somewhere? A "put these dictionaries in your project for this theme" file collection would be neat too, since they seem to be really all over the place.
Hello,
okay i managed to move my validation tweaks away from your templates. Now i essentially ONLY want to change the purple to blue and be able to switch between RoyalLight and RoyalDark.
#1 <SolidColorBrush x:Key="{x:Static igDP:DataPresenterBrushKey.EditorNameKey}" Color="Black"/> does not work.
#2 <SolidColorBrush x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type igWPF:XamTextEditor}, ResourceId=EditorsFocusBorderBrush}" Color="Green" /> does work.
#3 <SolidColorBrush x:Key="CheckBoxPressedBorderBrush" Color="Orange" /> does not work.
#2 is great and all but i dont think its the "correct" way of doing this. And i would need to figure out this brush key from the dictionaries. Thats where i got key #3 too and it doesnt work... so this cant be right.
I noticed that i only need to change the "color_011" or "color_013" in the x_Brushes dictionaries. I would think i can just overwrite that brush a couple of times. Its the ones under the "Theme Accent colors" comment.
I think something like your proposed solution in #1 should be possible, but where do i get the correct static Keys?
All xaml files used by a theme are in the specific theme folder, however sometimes there is more than 1 file that you will need to add, as there might be references between them.
In the default styles folder, you will find all the default styles as well as all themes for this group. Some controls are divided in groups, so XamDataGrid is in the DataPresenter group, while all editors are in the Editors folder.
I find working with the default styles folder easier, but using either will net the same result.
Regarding XamGrid, this is a control that was succeeded by XamDataGrid. They are not the same control and work differently, so this is why it produced errors.
Some editors use components in other ordinariness, so yes, you will need to add primitives which are under windows folder as well
Regarding the feasibility, it all depends how much you want to change, and how many components you want styled differently. Some controls are much easier to style than others.
If you just want to tweak some colors, you can try assigning values to the key a brush relates to, and if there are not many controls, you can just create a style based on the themed style, and do the tweaks:
<SolidColorBrush x:Key="{x:Static igDP:DataPresenterBrushKey.EditorNameKey}" Color="Black"/>
<Style TargetType="{x:Type igDP:XamComboEditor}" BasedOn="{x:Static igThemes:EditorsIGTheme.XamComboEditor}"> </Style>
Regarding typos, there should be none. The xaml coming with the installation should be all correct, so if you find a typo, please report it so we can address this issue immediately.
Should you feel I did not cover any of your questions, please let me know.
SIncerely,Tihomir TonevAssociate Software DeveloperInfragistics