MainPage.xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:TestProject"
xmlns:system="clr-namespace:System;assembly=netstandard"
x:Class="TestProject.MainPage">
<StackLayout Margin="10">
<Label>
<Label.FormattedText>
<FormattedString>
<Span Text="FirstLine text" />
<Span Text="{x:Static system:Environment.NewLine}"/>
<Span Text="{SecondLine text" />
</FormattedString>
</Label.FormattedText>
</Label>
</StackLayout>
</ContentPage>
It really worked. A very simple and concise solution. Thank you.
ReplyDelete