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

XAML Syntax Support

Topics: Developer Forum, Project Management Forum, User Forum
Apr 16, 2007 at 6:06 AM

I am a WPF Programmer, I would like to have XAML example code (just LIKE C#,VB,VC++) in my HELP File generated by Sandcastle Help File Builder. I am using Latest Build both Sandcastle & Sandcastle Help File Builder. I have created XAML example Code in C# SOURCE FILE like what we do specify for C#/VB syntax

eg: ///<example>
/// <code>
/// XAML CODE goes here...............
/// </code>
/// <example>

But I am not able to generate XAML example code in HELP FILE. Can any one give me suggestion or comment on this issue


Apr 16, 2007 at 6:34 AM
The code colorizer doesn't support it. Since I don't know XAML or what might constitute it's syntax, it'll be up to someone else to update the colorizer's syntax file. There's a reference in the help file to the article that describes the syntax file's XML structure. If you can update it to support it, I'll add the necessary changes in a future release.

Apr 16, 2007 at 11:25 AM
Hi Eric,

My assumption is that we have to add following in <generators> sections of Sandcastle\Presentation\vs2005\Configuration\sandcastle.config file

<generator type="Microsoft.Ddue.Tools.XamlUsageSyntaxGenerator" assembly="%DXROOT\ProductionTools\SyntaxComponents.dll">

<!-- Classes whose subclasses (and members) do NOT get XAML syntax even though they otherwise satisfy the XAML-ness algorithm -->
<class api="T:System.EventArgs"/>
<class api="T:System.Exception"/>
<class api="T:System.Security.Permissions.Permission"/>

<!-- List the assemblies for which XamlGenerator generates XAML syntax or boilerplate.
The XAML syntax blocks for members of all other assemblies get a generic boilerplate, e.g. "Not applicable." -->
<assembly name="PresentationFramework"/>
<assembly name="PresentationCore" />



and make necessary changes in SANDCASTLE HELP FILE BUILDER .


Apr 16, 2007 at 4:33 PM
That would generate syntax sections at the top of the page but it won't colorize the code which is what you were asking for with the <code> tags. XAML syntax sections are also not currently supported but I can add support for them by adding the necessary generators and the options to the SyntaxFilters project property. Also note that the help file builder does not use the configuration files in the Sandcastle installation folder. It uses a template in the .\Templates folder under the help file builder installation folder. You could probably manually add the syntax generator options to it as a temporary workaround.