XamlUsage Syntax Filter

Jun 16, 2008 at 10:35 AM
Hi there,

I'm trying to generate syntax sections for XAML object usage, but so far withoout success :-/ Shouldn't the XamlUsage syntax filter also
enable XAML syntax generation (not only create a language filter...)? I'm using SHFB 1.7 and the latest Sandcastle release, together with all patches. Presentation style is VS2005.

I'm pretty sure that at least some of my classes can be used from XAML (e.g. all my MarkupExtensions). Am I just missing some configuration, or is XAML usage currently broken?


Jun 16, 2008 at 2:59 PM
Edited Jun 16, 2008 at 2:59 PM
I'm not aware of any examples of how to use the XAML syntax filter so it's a bit of an unknown right now.  There is an additional configuration file for it (Presentation\shared\configuration\xamlSyntax.config) but again I'm not sure how it's supposed to be used.  If you don't get a response here, you might try contacting Anand to see if he can supply you with the necessary info and get him to post a blog entry about it.

Oct 13, 2012 at 9:18 PM
Edited Oct 13, 2012 at 9:22 PM

It seems that you can just add the namespaces/classes to be documented to the config (the syntax can be inferred from current content) and voila, you have generated xaml syntax in your help file.

However, at least for vs2010 style the XAML syntax block is still present, just empty for classes that are not included in the config.

EDIT: I now notice that it also incorrectly says "XMLNS for XAML: Not mapped to an xmlns." even though there is a xmlns mapping.

Oct 13, 2012 at 10:38 PM
Edited Oct 13, 2012 at 10:38 PM

You can add a XAML configuration file item to the project to define the XAML namespaces in your project.  Set it's build action to XamlConfiguration.  There are instructions in the template file created from the Add New Item project option that describe how to use it.  Regaring the VS2010 style, I think there are some issues with the syntax section groupings hence the blank XAML section that shouldn't be appearing.  It can happen with the Visual Basic Usage syntax filter if enabled too.