Reputation: 107
I verified in some tests that just using TextType
as Text
, I can cut the text from a label at the end.
I wonder if there is any way to accomplish this in text in HTML format.
<Label Text="{Binding message}"
TextType="Html"
LineBreakMode="TailTruncation"
HorizontalOptions="StartAndExpand"
Style="{StaticResource LabelStyle}"/>
Upvotes: 0
Views: 89
Reputation: 10938
You could binding the text with html string like below.
public string message { get; set; }
public MainPage()
{
InitializeComponent();
message = "This is <strong>HTML</strong> text.";
this.BindingContext = this;
}
Upvotes: 1