In the XAML view, put some XAML that you want to use as a comment
Then surround him
<StackPanel> <Button Content="Click me, I do nothing!" /> </StackPanel>
Note. I put this in the MainWindow.xaml file, but it can be any XAML file.
Now in C # use this as a comment:
/// <summary> /// Interaction logic for MainWindow.xaml /// </summary> /// <example> /// <code source="MyProject.Namespace/MainWindow.xaml" region="XAML snippet" lang="XAML" title="A linked *.xaml file treated as XAML"/> /// </example>
SandCastle understands this syntax and generates the appropriate documentation (for example, on MSDN), however it will not appear in intellisense.
You can format a regular <summary> body with > and < instead of < > characters to mimic the XAML syntax, but it will be a pain.
source share