我有必要将一些HTML文本(不与℃的html页面; HTML>
和<身体GT;
标签,一切,只是一些< I>
和<小时/>
和东东)在C#.net 4.0 WinForms应用程序。 preferably这将是一个面板
式的控制,你可以只 p.HTML =somehtml
上它会显示HTML。有没有人有.NET HTML的经验呈现的控制,他们可以推荐?我发现这在$ C $的CProject,但我在那里有点担心的东西。
I have the need to render some html text (not an html page with <html>
and <body>
tags and everything, just some <i>
's and <hr />
s and stuff) in a C# .NET 4.0 Winforms application. Preferably it would be a Panel
-like control that you could just p.HTML = "somehtml"
on and it would display HTML. Has anyone had any experience with .NET HTML rendering controls that they could recommend? I found this on codeproject but I'm a little wary of stuff on there.
为什么不使用内置的 web浏览器
控制。您可以随时在封闭的HTML代码段标准&LT; HTML /&GT;
标记
Why not use the build in WebBrowser
control. You can always enclose your html snippet in standard <html/>
markup.
string html = "<i> some text </i>";
webbrowser1.DocumentText = string.Format("<html>{0}</html>", html);