Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show HTML in Xaml in C#

Tags:

html

c#

xaml

I've got a HTML string and I just want to show how it looks like.

How can I show this string so that it looks like an HTML page?

like image 450
Stef Dhollander Avatar asked Apr 08 '11 08:04

Stef Dhollander


4 Answers

Try using <Frame Source="page.html" ... />

or WebBrowser

see MSDN link here

like image 158
Bek Raupov Avatar answered Oct 29 '22 11:10

Bek Raupov


I guess you'll have to use <WebBrowser> control. you will need to call the NavigateToString function. Check out http://blogs.msdn.com/b/llobo/archive/2008/06/12/wpf-webbrowser.aspx

like image 39
Unknown Avatar answered Oct 29 '22 11:10

Unknown


You can use a WebBrowser control, and the NavigateToString method as described here - Set System.Windows.Controls.WebBrowser's content to a static HTML literal?

like image 2
devdigital Avatar answered Oct 29 '22 11:10

devdigital


You can use the Webbrowser control to achieve this.

like image 1
ChrisWue Avatar answered Oct 29 '22 10:10

ChrisWue