Today, we recommend you to display HTML on the Silverlight page.CodeYou can easily add HTML code or an HTML page address to Silverlight after referencing the extension package. More importantly, it is a free control, let's talk about the code below.
Usage:
< Grid X : Name = "Layoutroot" Background = "White" > < Border Margin = "30" > <! -- Place the control, and sourceuri is the referenced webpage address --> < Divtools : Htmlhost Name = "Htmlhost" Sourceuri = Http://www.google.com" /> </ Border > </ Grid >
Private VoidButton_click (ObjectSender, routedeventargs e ){// Pop up an htmlStringbuilder html =NewStringbuilder (); html. appendline ("<H1> heading "); Html. appendline ("<P> This is a paragraph <span style = 'color: red'> using </span> CSS <strong> formatting </strong>. </P>"); Html. appendline ("<Ul> <li> list item 1 </LI> <li> list item 2 </LI> </ul>"); Htmlhost. sourcehtml = html. tostring ();}
Original Website: http://www.divelements.co.uk/silverlight/tools.aspx
Tool download: http://www.divelements.co.uk/silverlight/SilverlightTools.1.0.1.zip
I hope it will be useful to you ~!