Tuesday, 16 March 2010

Writing an article editor with Windows Presentation Foundation

The F#.NET Journal just published an article about the design and implementation of a complete GUI application:

"This article describes the article editing tool we are creating to help automate the process of generating journal content. The editor provides a simple text editor where the author writes a form of markdown. The markdown is interactively parsed and pretty printed in a separate pane and the editor allows the result to be exported to HTML for inclusion in the journal. The application is based entirely upon Windows Presentation Foundation..."

To read this article and more, subscribe to The F#.NET Journal today!


Anonymous said...

While you're at it, you could consider enabling literate programming as well. I think markdown + literate programming is a good mix, though I apparently am not the first one to have the idea: http://passingcuriosity.com/2008/literate-haskell-with-markdown-syntax-hightlighting/

Flying Frog Consultancy Ltd. said...

@Anonymous: Literate programming is trickier in F# because you really need to hack to VS mode to get it to display and use the code correctly. Ideally, you want a completely different kind of IDE like Mathematica's notebook front end. Microsoft have been making noises about a WPF-capable F# interactive session for VS2012 though.

Anonymous said...

Yup, I'm discovering that... I figured that a Design/Source type split would be quite nice, but actually you need Markdown/Output/Code windows. Or maybe I should go the route of RichText/Code and forget markdown.

Ideally, updates would be bi-directional as well, to some extent.

Writing the bit that extracts the code from the markdown document was relatively easy, though given that my test document is the extractor, debugging is a bit hard!