Converting HTML to XAML

htmltoxaml The project I’m working on at the moment I’m taking a bunch of content that in the previous system was stored as HTML and I’ve re-written the application in WPF and displaying the content as a FlowDocument.  Today I sat down to look at how to do the data conversion, basically I needed to convert HTML to XAML.  After looking at it awhile and thinking it’s quite a bit of work, someone else must have done this before I stumbled upon the HTML to XAML Prototype Conversion Utility. Now the code has a lot of todo’s but the HTML I was working on was pretty simple..basic font sizes, bold, italic, text align etc and this worked a treat and saved me a lot of code and testing. Just had to tweak it a bit to output the document the way I wanted it and it was all good.

Technorati Tags: ,