如何将rtf转换为HTML格式或将xaml转换为HTML格式。 [英] How to convert rtf to HTML format or xaml to HTML format.

查看:266
本文介绍了如何将rtf转换为HTML格式或将xaml转换为HTML格式。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好



我在wpf C#中使用Rich文本框(正文)发送邮件



我想要将确切的内容发送给用户(维护样式),因为我必须将富文本框的内容转换为html格式,我该怎么做同样的帮助。





问候



我尝试过:



我在网上尝试了各种解决方案但是没有帮助。

Hello

I am using Rich text box(body) in wpf C# to sent a mail

I want exact content to be sent to user(maintaing style)for that I have to convert content of rich text box to html format ,How can i do the same pls help.


Regards

What I have tried:

I have tries u various solution online but failed pls help.

推荐答案

这应该是一个很好的起点:

编写自己的RTF转换器 [ ^ ]



看起来您可以覆盖方法以转换为您的首选格式。



一个建议是你首先要设计HTML代码想要邮件看起来像。然后你有一个模板,用于填写RichTextBox中的信息。
This should be a good starting point:
Writing Your Own RTF Converter[^]

It seems like you can override methods in order to convert to your preferred format.

One recommendation is that you first design HTML code for how you want the mail to look like. Then you have a template for how to fill in the information from the RichTextBox.


这篇关于如何将rtf转换为HTML格式或将xaml转换为HTML格式。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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