如何为 WPF 应用程序创建 chm 帮助文件?

发布于 2024-08-04 19:05:47 字数 140 浏览 4 评论 0原文

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

如何创建 chm 帮助文件?

首先在ms word中创建文档并将其转换为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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

っ〆星空下的拥抱 2024-08-11 19:05:47

我使用 Sandcastle 帮助文件生成器 (SHFB) 生成 CHM。

为了编写内容,我遵循了 Sandcastle MAML 指南中的指导和示例,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 工具是免费的。

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.

澜川若宁 2024-08-11 19:05:47

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

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文