This project has moved and is read-only. For the latest updates, please go here.

Context-sensitive help using MAML

May 19, 2010 at 9:28 PM


I'm having issues creating context-sensitive help using MAML.

Without MAML, when I want to bring up the "Motor" topic in the help file I would set the following options:

HelpNavigator = Topic
HelpKeyword = Motor.htm
HelpString property is blank
ShowHelp  = True

I press F1 on the Motor control and it brings up the appropriate section. This works fine if I create the .chm document using .htm files, but I can't get it to work when I've created the .chm with .aml files (using MAML).

Here are the steps I've taken when creating the help file:

  1. Create a SHFB project and add a ContentLayout file
  2. Add a few topics using MAML (.aml files)
  3. Select the 'Additional Content Only' plugin
  4. Build the help file

The help file builds successfully. I've tried setting HelpKeyword to

  • Motor.aml
  • C:\path\to\Motor.aml
  • The GUID (ie 4dc6fedc-f787-4dba-9c97-ae6279b4dfeb)

with HelpNavigator set to Topic and TopicId and I always get a "This page cannot be displayed" when the help file opens. If I click on the topic in the TOC on the left (or on the keyword if the Index is visible) then the page loads correctly.

Is there a step I'm missing? I'm pretty new to this so apologies if I get any of the terminology wrong.



May 20, 2010 at 3:14 AM

When compiled into a help file, the MAML topic filename is its GUID plus ".htm". You need to set the HelpKeyword to that prefixed with the "html/" folder (i.e. html/4dc6fedc-f787-4dba-9c97-ae6279b4dfeb.htm).



May 20, 2010 at 4:17 PM

That works and was simple enough, thanks Eric!


May 21, 2010 at 8:58 PM

How would you link to documentation generated from source code?

May 23, 2010 at 10:05 PM

This is covered in the NamingMethod property documenation in the help file.