Reputation: 333
Using 

is not working. Instead my button only appears to say "First Line."
<Button Text="First Line
Second Line"/>
Am I doing this incorrectly? Is there another simple way to make the text go onto the second line?
Upvotes: 0
Views: 1253
Reputation: 14956
I test it on Android,it works well,Did you run on ios ? I think this is mainly a problem with iOS because Android will wrap the text by default.
If you want run on ios,you could use customrenderer to achieve this.
[assembly: ExportRenderer(typeof(Button), typeof(iosbutton))]
namespace EntryCa.iOS
{
class iosbutton :ButtonRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Button> e)
{
base.OnElementChanged(e);
if (Control != null)
{
Control.TitleLabel.LineBreakMode = UILineBreakMode.WordWrap;
Control.TitleLabel.Lines = 0;
Control.TitleLabel.TextAlignment = UITextAlignment.Center;
}
}
}
}
Upvotes: 2