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

Ram*_*amm 6 chm

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

如何创建 chm 帮助文件?

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

请帮忙

谢谢

拉姆

Che*_*eso 4

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

\n\n

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

\n\n

它看起来像这样:

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

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

\n\n

不要被标签名“developerConceptualContent”吓倒。生成的 .chm 没有任何内容使其仅对开发人员有用。

\n\n

SHFB 工具是免费的。

\n