FontAwesome6 icon indicating copy to clipboard operation
FontAwesome6 copied to clipboard

WINUI examples doesn't work for me (VS 2022)

Open tucekt opened this issue 1 year ago • 1 comments

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!

tucekt avatar Mar 14 '24 21:03 tucekt

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" />

SteffenMangold avatar Jul 03 '24 15:07 SteffenMangold