这是我在Xamarin.forms中的片段。
all()
我需要制作“Italic”Italic字体和粗体“Bold”。
任何人都可以帮助我吗?
答案 0 :(得分:9)
我解决了。
var fs = new FormattedString ();
fs.Spans.Add (new Span { Text="Italic", ForegroundColor = Color.Gray, FontSize = 20, FontAttributes = FontAttributes.Italic });
fs.Spans.Add (new Span { Text=", Bold", ForegroundColor = Color.Gray, FontSize = 20, FontAttributes = FontAttributes.Bold });
labelFormatted.FormattedText = fs;