Share via


레이블 확장

확장은 Label 구성을 지원하는 일련의 확장 메서드를 Label제공합니다.

Formattedtext

FormattedText 메서드를 사용하면 여러 Spans를 .에 할당할 수 Label.FormattedTextProperty있습니다.

다음 예제에서는 using.FormattedText()에 여러 Spans를 Label 추가하는 방법을 보여 줍니다.

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 }
});