Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to create a chm help file for WPF Application?

Tags:

chm

For a WPF UI application, a CHM Help file needs to be created.

How to create a chm help file?

First create the document in ms word and convert it into chm help file? or any other method?

Please help

Thanks

Ramm

like image 473
user301016 Avatar asked Sep 13 '09 06:09

user301016


People also ask

How do I create a WPF file?

Open Visual Studio. On the start window, choose Create a new project. On the Create a new project screen, search for "WPF," choose WPF Application, and then choose Next. At the next screen, give the project a name, HelloWPFApp, and choose Next.

Does Microsoft support WPF?

WPF is Open Source Microsoft has proved to be on the side of open source with this approach and by open sourcing WPF it has indicated that it cares about its future.


1 Answers

I used Sandcastle Help File Builder (SHFB) to generate the CHM.

To write the content, I followed the guidance and example in the Sandcastle MAML Guide, available on codeplex. This involved me writing doc in a format called "MAML", which is an XML dialect for describing the help files.

It looks like this:

<?xml version="1.0" encoding="utf-8"?>
<topic id="4e9fd731-fc2f-4bdf-9ca2-3a8755411b2f" revisionNumber="1">
  <developerConceptualDocument
     xmlns       ="http://ddue.schemas.microsoft.com/authoring/2003/5"
     xmlns:xlink ="http://www.w3.org/1999/xlink">
    <!--
        <summary>
          <para>Optional summary abstract</para>
        </summary>
        -->
    <introduction>
      <!-- Uncomment this to generate an outline of the section and sub-section
           titles.  Specify a numeric value as the inner text to limit it to
           a specific number of sub-topics when creating the outline.  Specify
           zero (0) to limit it to top-level sections only.  -->
      <!-- <autoOutline /> -->
      <para>
      </para>
    </introduction>
    <!-- Add one or more top-level section elements.  These are collapsible.
         If using <autoOutline />, add an address attribute to identify it
         and specify a title so that it can be jumped to with a hyperlink. -->
    <section address="Section1">
      <title>Section Title</title>
      <content>
        <!-- Uncomment this to create a sub-section outline
             <autoOutline /> -->
        <para>
          Lorem ipsum dolor sit amet, consectetuer adipiscing
          elit. Integer vulputate, nibh non rhoncus euismod, erat odio
          pellentesque lacus, sit amet convallis mi augue et
          odio. Phasellus cursus urna facilisis quam. Suspendisse nec
          metus et sapien scelerisque

        </para>
        <para>
          Quisque pharetra lacus quis sapien. Duis id est
          <externalLink>
            <linkText>dictum sed, sapien</linkText>
            <linkAlternateText>alt text</linkAlternateText>
            <linkUri>http://stackoverflow.com/questions/tagged/chm</linkUri>
          </externalLink>
        </para>
      </content>
    </section>
    <relatedTopics/>
  </developerConceptualDocument>
</topic>

In addition to authoring the content on various pages, you need to specify the outline - how all the pages fit together. Once you get it set up it's pretty easy. Then generating the CHM just requires running SHFB.

Don't be put off by the tagname "developerConceptualContent". There's nothing about the .chm generated that makes it useful only for developers.

The SHFB tool is free.

like image 118
Cheeso Avatar answered Oct 07 '22 23:10

Cheeso