The Label
extensions provide a series of extension methods that support configuring a Label
.
The FormattedText
method allows us to assign multiple Span
s to the Label.FormattedTextProperty
.
The following example demonstrates how to add multiple Span
s to a Label
using .FormattedText()
:
new Label().FormattedText(new[]
{
new Span { Text = "Here is a link to the docs: " },
new Span { Text = "https://learn.microsoft.com/", TextDecorations = TextDecorations.Underline, TextColor = Colors.Blue }
});
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. Additional resources In this articleWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4