0
我試圖重現此樣品 https://github.com/xamarin/xamarin-forms-samples/blob/master/WorkingWithFontsXamarin形式與字體
特別是這行代碼工作:
var labelBoldItalic = new Label {
Text = "BoldItalic",
Font = Font.SystemFontOfSize (14, FontAttributes.Bold | FontAttributes.Italic),
VerticalOptions = LayoutOptions.CenterAndExpand,
HorizontalOptions = LayoutOptions.CenterAndExpand,
};
但是VS 2013說:這個名字FontAttributes不會在當前存在上下文。
Xamarin版本:
您是否使用最新的Xamarin.Forms包? – Jason 2014-11-24 03:17:48
我這麼認爲,這很奇怪,因爲我已經下載了上面提到的樣本,版本是Xamarin.Forms.1.2.3.6257。但是當我創建一個新的解決方案時,版本是:Xamarin.Forms.1.0.6186。 – rubStackOverflow 2014-11-24 03:28:22