Repository navigation
Troubleshooting
Cause: No icon provider was registered before the icon was used.
Fix: Ensure you call IconProvider.Current.Register<...>() in Program.cs before AppBuilder.Configure<App>(). See Getting Started.
Cause: The icon name doesn't exist in the Font Awesome Free set, or there's a typo.
Fix: Verify the icon name at fontawesome.com/search?o=r&m=free. Icon names use the fa-{name} format (e.g. fa-house, not fa-home in FA 6).
Cause: You're requesting a style (solid, regular, brands) that only exists in Font Awesome Pro.
Fix: Use a different style that's available in the Free set, or supply a Pro icon source via IFontAwesomeUtf8JsonStreamProvider. See Custom Providers.
Cause: Two providers have identical prefixes.
Fix: Each provider must have a unique prefix. Built-in providers use fa (Font Awesome 6), fa7 (Font Awesome 7), and mdi (Material Design). Choose a different prefix for your custom provider.
- Verify the icon name is correct and the provider is registered.
- Check that the XAML namespace is declared:
xmlns:i="https://github.com/projektanker/icons.avalonia" - Ensure the
Valueproperty is set (not empty).
FontSize controls icon dimensions. If not set, it inherits from the parent. Set it explicitly:
<i:Icon Value="fa-solid fa-check" FontSize="24" />- On the
Iconcontrol, useForeground. - On
IconImage, useBrush(notForeground).
<!-- Icon control -->
<i:Icon Value="fa-solid fa-check" Foreground="Red" />
<!-- IconImage -->
<i:IconImage Value="fa-solid fa-check" Brush="Red" />The Animation property must be set on the Icon control itself, not on a parent:
<!-- Correct -->
<i:Icon Value="fa-solid fa-spinner" Animation="Pulse" />
<!-- Won't work: Animation on a wrapper -->
<Border>
<i:Icon Value="fa-solid fa-spinner" />
</Border>If you're migrating from the original Projektanker.Icons.Avalonia package:
-
NuGet packages: Replace
Projektanker.Icons.Avalonia.*withOptris.Icons.Avalonia.* -
C# namespaces: Change
using Projektanker.Icons.Avaloniatousing Optris.Icons.Avalonia -
XAML namespace: No change needed --
xmlns:i="https://github.com/projektanker/icons.avalonia"is preserved for backward compatibility - API: The public API is unchanged
The XAML namespace https://github.com/projektanker/icons.avalonia is an opaque XML identifier, not a clickable web URL. This is intentional and preserved for backward compatibility with existing XAML files.