XAML to Html and vice versa

醉酒当歌 提交于 2019-12-03 20:46:10

Well, it's just XML. So convert Section and Paragraph elements to their appropriate HTML equivalents (p and div, probably) and do so for the inlines as well (Run expands to just the text, probably, Span gets span, LineBreak gets br, etc.).

I.e. what you need to do is read the XAML as XML and create another document alongside where you write the elements as HTML. Applying formatting is a bit tricky, though, as you need to convert that to CSS styles (and maybe not everything apart from basic font properties works the same way in XAML and CSS).

This demo might be a good start: http://msdn.microsoft.com/en-us/library/aa972129(v=vs.90).aspx

It covers both conversions.

This product converts C# and XAML to HTML and JavaScript. It has a free edition that allows commercial use.

http://cshtml5.com/

A wide range of both .NET and XAML features are supported, which can be seen here.

This tool allows you to enter XAML and have it converted to HTML, or enter HTML and have it converted to XAML.

XAML to HTML and HTML to XAML Converter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!