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
1385
Extending theme but only the colors
posted

I'm using WPF 2022.2, and I want to use the Metro theme in my application but I want to change the color palette to use those from our corporate palette.

What would be the best practice to do that?

Parents
No Data
Reply
  • 7555
    Offline posted

    Hello Walter, 

    Thank you for contacting. In order to modify existing theme you would have to modify the theme files .

    For different controls ,there are different theme files. So may I know which control you are trying to change the color? Also I would say its not straight forward to extend the themes ,When you install the control it create DefaultStyles, have a look at this path: 

    C:\Program Files (x86)\Infragistics\2021.2\WPF\DefaultStyles 

    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 example XamDataGrid is in the DataPresenter group, while all editors are in the Editors folder.  

    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>

    Looking into our docs I found this topic , might help you to understand: 

    https://ko.infragistics.com/help/wpf/thememanager-extending-existing-control-theme

    You can also go through this post discussing the same: 

    https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/121557/extending-a-theme

                            

Children
No Data