【问题标题】:Xamarin Forms Working with Fonts使用字体的 Xamarin 表单
【发布时间】:2014-11-24 01:59:44
【问题描述】:

我正在尝试重现此示例 https://github.com/xamarin/xamarin-forms-samples/blob/master/WorkingWithFonts

尤其是这几行代码:

var labelBoldItalic = new Label {
    Text = "BoldItalic",
    Font = Font.SystemFontOfSize (14, FontAttributes.Bold | FontAttributes.Italic),
    VerticalOptions = LayoutOptions.CenterAndExpand,
    HorizontalOptions = LayoutOptions.CenterAndExpand,
};

但是 VS 2013 说:Name FontAttributes 在当前上下文中不存在。

Xamarin 版本:

【问题讨论】:

  • 您使用的是最新的 Xamarin.Forms 包吗?
  • 我想是的,很奇怪,因为我已经下载了上面提到的示例,版本是 Xamarin.Forms.1.2.3.6257。但是当我创建一个新的解决方案时,版本是:Xamarin.Forms.1.0.6186。

标签: visual-studio-2013 xamarin xamarin.forms


【解决方案1】:

谢谢杰森

我通过 NUGET 解决了:

获取项目 -all |安装包 Xamarin.Forms

【讨论】:

    猜你喜欢
    • 2017-01-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-20
    • 1970-01-01
    • 2018-02-02
    • 2022-06-30
    • 2016-11-14
    相关资源
    最近更新 更多