Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Icons momentarily displayed as text when using radzen appearance toggle

$
0
0

When toggling the appearance of my .NET 9 Blazor web app using the RadzenAppearanceToggle, all icons (RadzenIcon) disappear for about a second before automatically reloading. For this second the icons are displayed as text.

Steps to reproduce

  • I created a new Blazor .NET 9 web app project (InteractiveAuto, with default pages)
  • I followed the Radzen Get-Started instructions
  • I added two RadzenComponents to the Home.razor
<RadzenAppearanceToggle /><RadzenIcon Icon="home" />
  • After starting the website and clicking the RadzenAppearanceToggle the "home" icon is displayed as text. After about a second it will again be displayed as expected.

Icons displayed as text

After a second:

Icons displayed correctly

My temporary solution is to include the material icons directly

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/material-icons@1.13.12/iconfont/material-icons.min.css">

and override the radzen icon font variable to use these icons:

:root {    --rz-icon-font-family: 'Material Icons';}

(The default value of --rz-icon-font-family is Material Symbols.)

Is there a better way to overcome this issue?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>