Blazor Server - Change Theme Dynamically

Hello, is there a way to dynamically change the theme? The way you do it on your site would be an ideal solution. Is that possible? If so could you provide a sample?

Thank you

Hey @anthonyyott,

You can use the same approach as in our demos - here is the source code:

Thank you. That was very helpful

Can you please update the link? It just points to the github project now.

I could not find anything there, on how to change the theme dynamically.

The link points exactly where it should, the project of our demos where the theme is changed dynamically:

If you care to open the project you will find:

and other useful stuff that might help you to do the same in your own app.

1 Like