silverlighttextbindingsilverlight-2.0

How do I translate a ® into Silverlight Text Representation


I make calls to a webservice to get information that bind to the Text property of a TextBlock. Sometimes the information will contain encoded special characters for HTML - most notably the ® which I believe to the (r) symbol. The silverlight TextBlock just displays the raw text and not the (r). Of course, I can strip out the text, but it seems that someone on here will know how to translate HTMl codes like this into something that the TextBlock can understand. My first though is an iValueConverter with a Regex relace?

has anyone done one of these?


Solution

  • You just need to use HtmlDecode:

    System.Windows.Browser.HttpUtility.HtmlDecode(yourStringHere)