开发者

Wrapping Text and Hyperlinks in Silverlight

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

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

Importantl开发者_Python百科y, "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!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜