【问题标题】:how to create a chm help file for WPF Application?如何为 WPF 应用程序创建 chm 帮助文件?
【发布时间】:2010-11-27 20:55:37
【问题描述】:

对于 WPF UI 应用程序,需要创建 CHM 帮助文件。

如何创建 chm 帮助文件?

先用ms word创建文档,然后转换成chm帮助文件?还是其他方法?

请帮忙

谢谢

拉姆

【问题讨论】:

    标签: chm


    【解决方案1】:

    我使用Sandcastle Help File Builder (SHFB) 来生成 CHM。

    为了编写内容,我遵循了 Sandcastle MAML 指南中的指导和示例,available on codeplex。这涉及到我以一种名为“MAML”的格式编写文档,这是一种用于描述帮助文件的 XML 方言。

    看起来像这样:

    <?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>
    

    除了在各个页面上创作内容外,您还需要指定大纲 - 所有页面如何组合在一起。一旦你设置好它就很容易了。然后生成 CHM 只需要运行 SHFB。

    不要被标记名“developerConceptualContent”吓到。生成的 .chm 并没有任何东西使它只对开发人员有用。

    SHFB 工具是免费的。

    【讨论】:

      【解决方案2】:

      使用 word 创建帮助文件是一种选择。为此,您需要从 Microsoft 获取HTML Help SDK(免费),然后将您的文档转换为 HTML 并使用 HTML 帮助编译器进行编译。

      但是,有一些很好的集成工具可以帮助您大大加快这个过程。我听说的一个好消息是来自 JGSoft 的HelpScribbler。它不是免费的,但可以节省手动操作的时间。

      【讨论】:

        猜你喜欢
        • 2011-10-01
        • 1970-01-01
        • 1970-01-01
        • 2011-09-03
        • 2019-01-24
        • 1970-01-01
        • 2015-01-18
        • 2022-01-20
        • 2018-06-30
        相关资源
        最近更新 更多