当我尝试在 上创建新标签时Xamarin.Forms ,我收到以下警告:
about = new Label { Text = "" ,
TextColor=Color.Black,
Font = Font.SystemFontOfSize(16),//Warning occurred here
XAlign = TextAlignment.End,
HorizontalOptions = LayoutOptions.EndAndExpand};
'Xamarin.Forms.Label.Font' is obsolete: 'Please use the Font attributes which are on the class itself. Obsoleted in v1.3.0'
这个警告意味着什么,我应该怎么做?
最佳答案
使用 FontSize
, FontFamily
, 和 FontAttributes
Label
的属性类代替。
https://developer.xamarin.com/guides/xamarin-forms/user-interface/text/fonts/
关于c# - Xamarin.Forms 字体已过时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36039545/