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

XAML usage information not visible

Topics: Developer Forum, User Forum
Dec 1, 2014 at 10:29 AM
Edited Dec 1, 2014 at 11:22 AM
XAML usage information is not appearing in my help file built by SHFB. From what I have read, all I should need to do is enable the XAML Usage syntax filter and add a XAML Syntax file to my project. In the resultant help file I expect to see the XMLNS for XAML and XAML Object Element Usage sections that can be seen here, but it does not contain any XAML information whatsoever.

It is simple to reproduce:
  • In Visual Studio, create a new project using the template Visual C# -> Windows Desktop -> WPF Custom Control Library. Its name will default to WpfCustomControlLibrary1 and it will already contain this class:
namespace WpfCustomControlLibrary1
    public class CustomControl1 : Control
  • Create a new SHFB project and add the above project as a documentation source.
  • In Project Properties -> Help File -> Syntax filters, place a checkmark against XAML Usage.
  • Add a new XAML Syntax item to the project with a build action of XamlConfiguration and set its content to:
        <assembly name="WpfCustomControlLibrary1">
            <xmlns uri="clr-namespace:WpfCustomControlLibrary1;assembly=WpfCustomControlLibrary1">
                <clrNamespace name="WpfCustomControlLibrary1"/>
The CustomControl1 class appears in the help file but without any XAML usage information.

Is this a bug, or am I missing something? I am using the latest Help File Builder and Tools v2014.11.22.0.
Dec 3, 2014 at 8:53 PM
There appear to be some problems with the XAML Usage syntax generator. An attribute is missing from the reflection data that it relies on to determine if a class has a default constructor so it's skipping XAML info on type topics. Some properties do get XAML usage info but not all. I'll see about getting those issues fixed for the next release.

Dec 3, 2014 at 11:01 PM
Many thanks for investigating, Eric. I will be keenly awaiting the next release.