How do you apply different custom themes or built in themes in a MVVM app at run time?

I was attempting to build a proof of concept app to allow a user to select a theme to apply from a drop down combo, The list of themes would include some of the built in themes and a few custom themes. I have looked at a demo example of such a scenario here: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Skinmanager_mvvmsample-1966457253 . The problem I have run into is that the example uses the VisualStyles property which doesn't seem useful for custom themes, the example also muddies the the solution with the use of a third party dependency on Caliburn Micro. What would be the best way to implement a MVVM solution that would apply either a custom theme or a built-in theme at run time that would be applied application wide (all views within the app)?

Any insight would be very helpful, Thanks.


2 Replies

EM Elakkiya Muthukumarasamy Syncfusion Team September 23, 2021 03:41 PM UTC

Hi Jack, 

Greetings from Syncfusion. 

We are working to achieve your requirement and we will update you the further details on 27th September 2021.We appreciate your patience until then. 

Regards, 
Elakkiya 



EM Elakkiya Muthukumarasamy Syncfusion Team September 27, 2021 02:43 PM UTC

Hi Jack, 

Thanks for your patience. 

We have checked your query “How do you apply different custom themes or built in themes in a MVVM app at run time” and we would like to let you know that we can apply the custom themes or built themes by using Theme property of SFSkinManager. Please refer the below sample for the same. 

In this sample we have used custom theme (Theme Name:CloozLight) for FluentLight. 


Please try it with the above solution and let us know if you need any further assistance on this. 

Regards, 
Elakkiya 


Loader.
Up arrow icon