【发布时间】: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