Is there any way to display formatted text in Silverlight?
I have a database of articles with HTML formatting (p,b,i,h1,h2 tags). I need to figure out a way to display them in a Silverlight application while retaining the formatting from the database.
There is an HtmlTextBlock control written by David Anson (from MS) which has support for the following HTML elements:
Fortunately, the source is distributed, and you'd have to provide support for
H*
tags.However, if you are using Silverlight 4, then you can use the WebBrowser class and just load your HTML into that. Just note (as santiagoIT does in the comments) that the WebBrowser control will only work if you are running out-of-browser.