c# - Apply italic effect in the part of Text property of Label in Xamarin.forms -


this snippet in xamarin.forms.

grid.children.add (new label {text = "italic, bold",                             xalign = textalignment.center,                             yalign = textalignment.center,                             fontsize = 30                         }, 1, 1); 

i need make "italic" italic font , bold "bold".

can me?

i solved it.

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; 

Comments

Popular posts from this blog

javascript - Create websocket without connecting -

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

android - Linear layout children not scrolling -