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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With