but in a wasm app the head and body tags are in the index.html file not the App.razor file, where should we put RadzenTheme tag in a wasm app using an index.html file?
Try this line in the head section of index.html <link rel="stylesheet" href="_content/Radzen.Blazor/css/default-base.css">
and use material or other theme name as a name of css file. In the line above insted of default-base.
Hi I have just been looking at the Theme Service does this not work in WASM applications? My setup is working but the Theme Service doesn't change the theme.
Thanks, I have tried to intergrate the Theme service but although I can call Them.SetTheme the Theme doesn't change.
I have setup this in the program.cs
builder.Services.AddRadzenComponents();
builder.Services.AddRadzenCookieThemeService(options =>
{
options.Name = "Theme"; // The name of the cookie
options.Duration = TimeSpan.FromDays(365); // The duration of the cookie
});
I then Inject the ThemeService on a page and call ThemeService.SetTheme(value); but nothing changes
Thanks Enchev, I have tried to do this but the demo setup looks different to mine. I have a single Blazor Web Assembly standalone application, my App.razor file looks like the RadzenBlazorDemos project but I am unable to run this directly. I have to run through RadzenBlazorDemos.Host The setup in this project is completely different. Is this expected or should I be able to directly run the RadzenBlazorDemos project?
I don't know if this is significant but I load the theme in the Index.html in the wwwroot folder by adding this line in the header