Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display HTML content in windows phone?

how to display my html content in my application.how to use htmltextblock? please help me frnd..i stucked with one week for this problem...my xml document description tag has html content how to bind that tag to my application

like image 980
Malarkodi Avatar asked Dec 28 '22 07:12

Malarkodi


1 Answers

You could probably make use of a WebBrowser control to show this content. An example of showing data from a string in this control from code behind would be as follows...

webBrowser1.NavigateToString("<html><body><h1>Description</h1><p>This is a description, set from code</p></body></html>");

I am tempted to downvote myself for using invalid markup in the HTML, but that seems a bit harsh, doesn't it? ;)

Anyway, if you want to bind to a property of a model, you will have to do some extra work to set the bindings. This blog post does a good job of explaining how to add a dependency property that you may use to bind to HTML strings in your models.

like image 128
ZombieSheep Avatar answered Jan 06 '23 02:01

ZombieSheep