Each SHFB project is its own container for everything that is visible in the draft documentation. When it is compiled, an XML document (software project) XML is inserted into the SHFB for placement in the document.
If you want to display images at the top of the class documentation, you must add the image to the SHFB project and refer to this image from the code comment. See Problem 2 ...
Problem 1:
"I cannot get an image to be displayed from a conceptual theme using the" image "tag
Be sure to use appropriate XML markup similar to this:
<section> <content> <mediaLink> <image xlink:href="MyMainImage"/> </mediaLink> </content> </section>
Please note that the HREF link (above) does not support the file type ,
this is because Sandcastle wants an ID .
- Add an image to the project using the default media folder . Or, if you want, you can create your own folder, for example, images.
- Go to the image properties page and set the Build option to Image . When you use the "image" tag, SHFB only uses the Image Identifier found on the property page, as shown in the HREF above.
- Recompile the project and open the CHM file and you will see the image.
Problem 2:
"I cannot get an image to be displayed using code commenting on XML markup in a programming project."
In the summary section of the code comment, the markup might look like this: this:
Note that the src attribute contains the containing file type. It must also correctly identify the folder that your SHFB project has for this image.
After adding this image to SHFB, right-click on it and change the "Create Action" property to Content
Happy coding and documentation! Thanks Eric W.
Keywords: SHFB cannot add image Sandcaple Help File Builder Conceptual image themes Image comment code images CHM file images How to add image to XML code Commenting C #
source share