使用html标签显示的Rich Textbox链接 [英] Rich Textbox Links displayed with html tags

查看:247
本文介绍了使用html标签显示的Rich Textbox链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想在Windows应用程序中在富文本框中包含超链接的Windows应用程序中显示一封电子邮件...一切都很好地填充了,但是问题是,在显示该电子邮件时,它显示的不是链接标签,而是超链接的整个URL.有没有什么方法可以像在电子邮件中一样在富文本框中显示邮件.是否有需要更改的属性??

在此先感谢
Jashobanta Chakraborty

Hi,
I want to display an email in an windows application that contains hyperlinks in it in a rich textbox... all are getting populated fine but the problem is, on displaying it is showing not the link labels but the entire URL of the hyperlinks. Is there any way to display the mail in rich textbox in the same way it is displayed in the email.. Is there any property which I need to change.?

Thanks in Advance
Jashobanta Chakraborty

推荐答案

如果您使用的是System.Windows.Forms,那么完美的组件(而不是直接使用富文本框)是此CodeProject文章中提供的HTML渲染器:
您将使用的专业HTML渲染器 [ ^ ].

这种方法确实很好.作者介绍了特殊的URI方案,因此您可以使用任何类型的嵌入式资源,例如图像等.

对于WPF,您可能可以使用另一个,但是我没有对其进行测试:
WPF HTML支持的TextBlock [
If you are using System.Windows.Forms, the perfect component (instead of using rich text box directly) is this HTML renderer offered in this CodeProject article:
A Professional HTML Renderer You Will Use[^].

This approach is really good. The author introduces special URI scheme so you can use embedded resources of any kind, such as images, etc.

For WPF, you probably can use another one, but I did not test it:
WPF HTML Supported TextBlock[^].

—SA


这篇关于使用html标签显示的Rich Textbox链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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