将HTML转换为XAML [英] Convert HTML to XAML

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

问题描述

有没有办法将HTML转换成XAML?
我注意到您可以将HTML粘贴到RichTextBox中,并且您可以通过查看FlowDocument来获取XAML。但是,这是一个黑客。
是否有更好的方法?

解决方案

我不认为有可能做一个从HTML到XAML,因为两者之间不存在一对一的等价关系。



有几个工具可以帮助您,但不期望得到完美的结果:

http:// msdn.microsoft.com/en-us/library/aa972129.aspx



http://windowsclient.net/downloads/folders/controlgallery/entry2313.aspx


Is there a way to convert HTML into XAML? I noticed that you can paste HTML into a RichTextBox and you can get the XAML by looking at the FlowDocument. However, this is a hack. Is there a better way?

解决方案

I don't think it's possible to do an exact conversion from HTML to XAML, because there isn't a one to one equivalence between the two.

There are a few tools that may help you, but don't expect a perfect result :

http://msdn.microsoft.com/en-us/library/aa972129.aspx

http://windowsclient.net/downloads/folders/controlgallery/entry2313.aspx

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

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