将HTML转换为XAML [英] Convert HTML to 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屋!