how to create a chm help file for WPF Application?

2020-07-12 07:31发布

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

标签: chm
2条回答
你好瞎i
2楼-- · 2020-07-12 08:11

Using word to create your help files is one option. To do this you would need to get hold of the HTML Help SDK from Microsoft (free) and then convert your documents to HTML and compile using the HTML Help compiler.

However there are some good integrated tools that could help you greatly speed up this process. One I've heard good things about is HelpScribbler from JGSoft. It's not free but would save timer over doing things manually.

查看更多
仙女界的扛把子
3楼-- · 2020-07-12 08:15

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.

查看更多
登录 后发表回答