3

We develop a WPF application that has something like a context sensitive help. The content of the help pages is currently written as word documents by external colleagues (say biologists) and then translated to xaml code by developers. This process is tedious and error prone because the biologists don't see the xaml code and the word documents can't easily be diffed and tracked in a version control system.

So we'd like to improve this process and maintain the content in a single place, in a format that

  • is simple to edit (preferrably with a wysiwyg editor),
  • is stored in a simple ascii format (for diffing / version control) and
  • can be included automatically as a resource in our C# application.

The solution could be a framework, an external tool or any other idea. The format should support simple html rendering such as bold and italic, superscripts, etc and images.

user829755
  • 1,310
  • 11
  • 24

1 Answers1

2

I suggest to use Flow Documents:

  • It is a WPF technology so you will use the well known tool.
  • Flow documents can be edited in RichTextBox WPF control. You can access an edited flow document via RichTextBox.Document property. Then you can save it into XAML file with XamlWriter. Taking all this thibngs into account you can easily and quickly create a simple application for your external colleagues.
  • Finally, you can load saved XAML files into FlowDocumentReader control in order to display them. It is described here.

I'm not only sure if flow documents can be embedded in resources. If it is not possible, I think that help files can be distributed separately. It doesn't seem to be a big problem.

Alternatively instead of flow documents you can use RTF format. RichTextBox can be also used to edit this kind of documents.

Michał Komorowski
  • 5,978
  • 1
  • 18
  • 23