One of the challenges with creating online documentation is readability, especially with long documents. Most of the time, we end up printing out documents instead of attempting to read them online. One we print them out we lose the ability to easily search for text, one of the great aspects of online documents. Creating a great online reading experience was one of the major goals with the WPF FlowDocument, a XAML element that can put into any WPF application as well as being natively hosted by Internet Explorer. To see an example of a FlowDocument, take a look at a whitepaper that I recently wrote on Silverlight and Web Analytics.
In their most basic form, FlowDocuments are XAML markup, similar in form to XHTML documents. In addition to HTML, FlowDocuments add automatic column flow, search, scaling, readability enhancements, and hyphenation. Indeed it would be conceivable to transform XHTML to FlowDocuments using XSLT, because both formats are XML. I started looking around and I couldn’t find any tools for creating FlowDocuments, especially with the authoring tool that I use (in addition to Windows Live Writer), Microsoft Word. Wait! Can’t I just transform the Word Open XML into the FlowDocument XAML using XSLT? I sure can. In a few hours, I built a sample Word 2007 Ribbon Add-in that transforms the Word Open XML (WordML) of any Word 2007 document into the FlowDocument XAML. I will be sharing the source code for this Office Business Application (OBA) solution as well.
On November 29th at 11:00 AM PDT, I will be presenting in a live Webinar on how I built this solution with Visual Studio 2008 Beta 2(Orcas). Here’s what I’ll cover:
- Show how to use Visual Studio 2008 to create Office 2007 (and 2003) Add-ins.
- Show how to use the new visual Ribbon Designer in Visual Studio 2008 to craft a ribbon interface for Word
- Show how to to use WPF windows within a Word 2007 Add-in
- Walk through the transformation code
- Demonstrate the FlowDocument format
If you are interested in coming to the webinar (it will be recorded if you cannot make it) please register here.