字体真棒图标未出现在Xamarin.Forms中

时间:2019-04-03 10:22:43

标签: xaml xamarin xamarin.forms font-awesome

字体很棒的图标在Xamarin.Forms中对我不起作用。这是我的Label xaml

<Label TextColor="Red" FontFamily="FontAwesomeBrands"  FontSize="Large" Text="&#xf122;"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,
Property=Width,Factor=1}">
</Label>

我已将这些文件添加到android项目的Assests文件夹中

enter image description here

输出仅显示空符号。我该如何运作?

2 个答案:

答案 0 :(得分:1)

您是否为此创建了特定于平台的CustomRenderers

请查看我的答案,然后按照教程进行操作。 Link to answer

希望这会有所帮助!

答案 1 :(得分:1)

我使用Xam.FormsPlugin.Iconize和Xam.Plugin.Iconize NuGet包作为图标:

xmlns:iconize="clr-namespace:FormsPlugin.Iconize;assembly=FormsPlugin.Iconize" 

<iconize:IconLabel Text="fa-question-circle" FontSize="Medium" TextColor="#666666" HorizontalTextAlignment="End"/>