将HTML嵌入到C#表单中 [英] Embed html in C# Forms

查看:118
本文介绍了将HTML嵌入到C#表单中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有将HTML嵌入到窗体自定义用户控件中的方法?我想创建一个用于.NET 4.0应用程序的轻量级控件,但由于它的内容是可行的,所以我认为使用HTML来布局它可能是最简单的。有没有办法在Windows窗体中实现这一点? C#和HTML还有其他一些主题,但非常确定的是,不涉及创建一个解析HTML并显示它的控件。

谢谢 您可以使用 WebBrowser ,但我建议不要走这条路。只需使用传统的控件来完成你所需要的,如果可能的话,可能还会结合一些GDI +。

Is there a way to embed HTML into a windows forms custom usercontrol? I want to create a lightweight control to be used in a .NET 4.0 application, but since the contents of it is viable to change, I was thinking using HTML to lay it out might be easiest. Is there a way to achieve this in windows forms? There are some other topics with C# and HTML but pretty sure non involves creating a control that parses HTML and displays it.

Thanks

解决方案

You could use a WebBrowser, but I'd recommend not going down that path. Just use traditional controls to accomplish what you need, if at all possible, maybe combined with a little GDI+.

这篇关于将HTML嵌入到C#表单中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆