sahithi
sahithi

Reputation: 1089

How to use a label to dispaly the combination of string and URL with underline

I am using a bel which will have to display the string which is a combination of string and url.

For example: Refer to this: https://www.google.com/ or https://www.google.com/ watch this.

I need to display entire string in the same label but the URL should be underlined.

How to do that.

Upvotes: 0

Views: 20

Answers (1)

Jason
Jason

Reputation: 89129

use FormattedText

<Label>
  <Label.FormattedText>
    <FormattedString>
      <Span Text="First " />
      <Span TextDecorations="Underline" Text="http://www.google.com" />
      <Span Text=" Third" />
    </FormattedString>
  </Label.FormattedText>
</Label>

Upvotes: 1

Related Questions