5

I have a string of text that looks like the following:

Thank you for visiting our site. Please review our rules and policies. 

Importantly, "rules" must be a hyperlink that points to "rules.html". Also, "policies" must be a hyperlink that points to "policies.html". The challenge is, I do not have hardly any real-estate for this text. The text cuts off at the word "Please". If it wasn't for the hyperlinks, I could do the following:

<TextBlock TextWrapping="Wrap" Text="Thank you for visiting our site. Please review our rules and policies." />

However, because of the hyperlinks, I can't figure out how to wrap the text naturally. Can somebody please tell me how to do this?

Thank you!

user208662
  • 10,869
  • 26
  • 73
  • 86

1 Answers1

5

Try this:-

<RichTextBox IsReadOnly="True">
    <Paragraph>Thank you for visiting our site. Please review our
      <Hyperlink NavigateUri="/rules.htm">rules</Hyperlink> and
      <Hyperlink NavigateUri="/policies.htm">policies</Hyperlink>.  
    </Paragraph>
</RichTextBox>

BTW, Don't be put off by the way that looks in Visual Studio Designer at runtime it works.

AnthonyWJones
  • 187,081
  • 35
  • 232
  • 306
  • RichTextBox looks like a rich text block when I tried this (maybe looked fine in 2010). What you'll want now is a RichTextBlock which is a read-only version of a RichTextBox and is probably what you want. – bressain Nov 25 '14 at 18:13