XAML public FieldModifier

Topics: Developer Forum
Nov 22, 2012 at 12:39 PM

Hi everyone, been using Sandcastle for a couple of days and I've successfully produced some great looking CHM and Website help files for a Silverlight 5.0 Application project.

But I have a problem when I set the FieldModifier property on a XAML control to 'public' like this...

<Button x:Name="Button1" x:FieldModifier="public" Content="Button1" Height="23" Width="75" HorizontalAlignment="Center" VerticalAlignment="Bottom" Padding="0" Margin="0,0,6,0" VerticalContentAlignment="Center" Click="AnyButtonClick" />

Because I can't see where I should set the equivalent /// <summary> </summary as per my code behind and so it of course inserts a warning in my CHM file like this...

[Missing <summary> documentation for "F:Dialogs.BasicDialog.Button1"]

I've seen XamlConfiguration mentioned in the Help file. Should I be using this? If so, does anyone have an example?



Nov 22, 2012 at 5:28 PM

The XamlConfiguration build action is used with an associated configuration file that allows you to add XAML namespace info to the API topics and define which classes should not get XAML namespace info.  If you add one to your project, the comments in the template file give some more info on its usage.  However, it won't solve the missing comments issue.  Since the button is effectively compiler generated, the only real option here if you want comments is to manage a separate XML comments file for such members.  It would be similar to creating a shared comments file for summary and namespace comments.  You'd just put the member IDs for the controls in the comments file rather than the namespace comments.  If you don't care to see those members in the help file, you can use the API Filter to get rid of them (you'll find it in the Visibility category of project properties).  If you want them included but don't care if they are undocumented, you can also use the options in the Missing Tags category to turn off the warnings.