Is it possible to dynamically change colors of the Metro theme?

Hello

I'm trying to use a Metro theme (Syncfusion.Themes.Metro.WPF) and dynamically change theme colors.
I created a custom skin helper which inherits from MetroSkinHelper, and a custom MetroThemeSettings with values from the metrothemebrushes.xaml and commonbrushes.xaml. Then, I registered theme with SfSkinManager like this

SfSkinManager.RegisterTheme("Metro", new MyMetroSkinHelper());

and then I change and register new theme settings and set the theme for the main window, but nothing changes.
It works for the SfSkinManager, and I know that Metro is not SfSkinManager theme, but I hoped it still might work.

When looking at the theme resources in the theme dll it seems that all the brushes are static resources and are hardcoded in the resource dictionary and neither metrothemebrushes nor commonbrushes are used anywhere.

So, is there a way to dynamically change the Metro theme colors? And if not, do you plan to change the Metro resource dictionaries to include common brushes and colors?

Thanks,
Tom



5 Replies 1 reply marked as answer

EM Elakkiya Muthukumarasamy Syncfusion Team May 21, 2021 12:46 PM UTC

Hi Tomislav, 
Sorry for the inconvenience. 
Query: Is there a way to dynamically change the Metro theme colors 
Currently we could not dynamically change colors of the Metro theme and we can dynamically change colors and fonts for latest SFSkinManager themes only. Which is explained in the below help documentation link 
Query: Do you plan to change the Metro resource dictionaries to include common brushes and colors? 
For Metro theme the brushes will be varied according to the controls. So, we could not include metro resource dictionaries as a common brushes and colors. Hence, we have suggested to use alternative latest SFSkinManager themes. Which is explained in the below help documentation link 
Please let us know if you need any further assistance on this. 
Regards, 
Elakkiya 


Marked as answer

TT Tomislav Tustonic May 21, 2021 01:38 PM UTC

Thanks for the reply.
Too bad about Metro, it's quite nice and fast and works better than SfManager themes for my particular case.

Tom


VR Vijayalakshmi Roopkumar Syncfusion Team May 24, 2021 12:53 PM UTC

Hi Tom  
 
Thank you for your update. 
 
Our Metro theme is an old skinmanager theme, in which all brushes and colors keys has been assigned and varied according to each controls. Whereas in our latest skinmanager themes, we have implement a new approach to improve consistency by having the common repository to maintain the font, color and brushes settings commonly for all Syncfusion controls. So it is difficult as it involved these procedure to change the approach with Metro theme to provide common repositories.  
 
So could you please let us know what particular issue you have been faced with our latest skinmanager themes and in which syncfusion controls. It would be very helpful for us to analyze and provide you the solution based on it. 
 
Regards, 
Vijayalakshmi VR 



TT Tomislav Tustonic May 24, 2021 03:35 PM UTC

Hello

Thanks for the reply.
Metro theme is, currently, much faster than the SfManager themes, and it hasn't the problem described here
https://www.syncfusion.com/forums/164545/sfskinmanager-themes-very-slow
This problem is promised to be solved in the next release, so hopefully it will go away. Besides that, I like Metro theme :)

I'm trying to make a version of the Orchestra shell (https://github.com/WildGums/Orchestra) which work with the Syncfusion ribbon instead of Fluent ribbon. This shell has a nice support for themes, which works quite differently than the Synfusion theming.
My current (unfinished) work, with the old SF verson, is here:
https://github.com/ttustonic/Orchestra.Shell.Ribbon.Syncfusion

So, as I said, I hope that the new version will fix the speed issues in SfManager themes and I'll be able to finish this project.

Cheers, Tom



VR Vijayalakshmi Roopkumar Syncfusion Team May 25, 2021 10:43 AM UTC

Hi Tom 
 
Thank you for your update. 
 
As updated earlier, in metro theme it has difficulties to maintain common repository for brushes and color keys, we suggest you to use our latest SfSkinmanager themes. Also the fix for performance issue would be include in our next nuget release, 2021 as updated in forum #164545. We will intimate you once it get published. 
 
Regards, 
Vijayalakshmi VR 


Loader.
Up arrow icon