如何解决如何在Xamarin Forms中进行代码隐藏后使用Font Awesome?
我很难用Font Awesome文本创建表单。当我在.xaml文件中执行此操作时,一切正常,如下所示:
EnterFieldBehavior
结果是:
资产目录:
我没有为iOS创建我的应用程序,因此我没有添加任何其他配置,即配置ResourceDictionary。这是我在Main.xaml.cs中尝试过的方法(我将展示三种实现方法,因为我不确定它应如何工作):
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Name="contentPage"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="myappname.Main">
<Label Text=""
FontFamily="Font Awesome 5 Free-Solid-900.otf#Regular"
FontSize="40" />
</ContentPage>
protected override async void OnAppearing()
{
Label newLabel = new Label()
{
Text = "",FontFamily = "Font Awesome 5 Free-Solid-900.otf#Regular",FontSize = 40
};
contentPage.Content = newLabel;
}
protected override async void OnAppearing()
{
Label newLabel = new Label()
{
Text = "",FontFamily = "Font Awesome 5 Free-Solid-900.otf#Font Awesome 5 Free-Solid-900.otf",FontSize = 40
};
contentPage.Content = newLabel;
}
他们每个人的结果是:
我在做什么错了?
解决方法
尝试使用\ u代替&#x
所以它应该像这样:
ggplot(df2,mapping = aes(x=District.))+
geom_bar(aes(y=Asking/1000),stat="identity") +
geom_line(data=df2,aes(x=District.,y=Area,group=1),inherit.aes = FALSE) +
scale_y_continuous(sec.axis = sec_axis(~ .*0.4,name = "Area")) +
theme_light() +
theme(axis.text.x = element_text(angle = 90,hjust=1),axis.text.y = element_text(color = 'green'),axis.title.y = element_text(color='green'),axis.text.y.right = element_text(color = 'blue'),axis.title.y.right = element_text(color='blue'))
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。