FontAwesome6
FontAwesome6 copied to clipboard
WINUI examples doesn't work for me (VS 2022)
After installing nuget packages of FontAwesome6.Fonts.WinUI and FontAwesome6.Svg.WinUI the shown examples like:
<Window x:Class="FontAwesome6.Example.WPF.MainWindow" xmlns:fa="http://schemas.fontawesome.com/icons/svg"> <fa:ImageAwesome Icon="Solid_Flag" /> <fa:SvgAwesome Icon="Solid_Flag" /> </Window>
do not work for me as the xmlns is not recognized.
After some fiddling I found this working instead:
xmlns:fa6="using:FontAwesome6.Svg"
<fa6:SvgAwesome Icon="Regular_CircleStop" />
Recommend to either fix the nuget registration or just the docu ;-) Thx anyway!
Thanks @tucekt !
The example seems wrong. based on your solution this works for me now:
<UserControl
x:Class="My.UserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:fa6svg="using:FontAwesome6.Svg"
xmlns:fa6font="using:FontAwesome6.Fonts">
[...]
<fa6font:FontAwesome Icon="Solid_Flag" />
<fa6svg:SvgAwesome Icon="Regular_CircleStop" />