locked
Show dynamic Link inside a text block/text box in windows store app in c#.

    Question

  • Hi All,

    I am windows 8 developer in c#.I am developing a chat related windows 8 store app.Sometimes one receives as well as send message including a link. This link should be active in the text area of the message, so people can click the link while they are in the app. How can I do this? 

    ThanQ

    Ganesh

    Monday, June 9, 2014 8:13 AM

Answers

All replies

  • Did you try using a RichTextBlock? that could help you
    Monday, June 9, 2014 10:20 AM
  • Hi,

    ThanQ for your valuable reply. How can I show rtf strings in a RichTextBlock (or any other UI text element)? There's no rtf property I could use (different from .net I think). And if I bind the string to the normal text property I only get the rtf code itself. How can use it.Can you give some source code link?

    ThanQ

    Ganesh

    Monday, June 9, 2014 10:54 AM
  • Hi,

    RichTextBlock do not support RTF string. But RichEditBox control can support it .You can use a RichEditBox  instead of RichTextBlock. You can inject RTF with RichEditBox.Document.SetText() method. If you don't want to use that then you should parse the RTF yourself and create the block elements for the RichTextBlock to display it. You can refer to the link to get more information about RichEditBox:

    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh700391.aspx

    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.ui.xaml.controls.richeditbox.aspx

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Tuesday, June 10, 2014 2:03 AM