Hello
I have an existing Dotnet 9 webassembly project (formerly "standalone", I don't want any server side parts) that I try to add Radzen to.
It works for the most part. What I am struggling with now is to apply a theme and/or change colors/swatches by selecting one in Radzen Studio. It just doesnt change the theme of the running app. I get whatever theme/CSS is set by one of the CSS rows below.
Below is my index.html
The actual theme runtime is determined by whatever of the following CSS rows I have in the index.html file. That is perhaps not surprising, but I can't leave out that row either as then I get no CSS at all:
The provided code doesn't seem to come from a Blazor standalone app - <HeadOutlet @rendermode="@InteractiveWebAssembly" /> indicates a regular WebAssembly app.
In addition to what @korchev said, you don't need to link any css files in the <head> if you use <RadzenTheme>. Have a look at this Get Started article and remove this line from the <head> as it overrides any themes registered with RadzenTheme:
Hi
You are right @korchev, that came from too much copy paste and I have removed that line since.
@yordanov If I remove those lines I get no CSS at all
Does this have to do with the ThemeService not being invoked properly as I now don't have the code that you have added to the App.razor in your project templates? What can be done instead in case of standalone/client side app? Being a standalone app I don't have access to cookies that way
I am still not sure if you have a WASM standalone app or not.
If you have a standalone app you should follow the WASM standalone instructions. The code you have pasted is not for WASM standalone.
If you have a subscription you can send us your app at info@radzen.com and we will check it for you.
If I dont include this line in the index.html then CSS is not applied on the WYSIWYG pages in Radzen Studio: <link rel="stylesheet" href="_content/Radzen.Blazor/css/material.css" />
I still cant get changes to colors/swatches to appear runtime in browser. Only on the WYSIWYG pages in Radzen Studio (assuming the row above).