Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add xaml code in c# comment?

/// <summary>
/// 
/// </summary>
/// <remarks
/// 
/// </remarks>

How to add xaml code in above comment, avoiding code parser to create links that do not exist (CTRL + Click messages)?

like image 524
Goran Avatar asked Dec 09 '22 21:12

Goran


1 Answers

You have two options:

  1. Standard XML escaping

    /// &lt;TextBlock Text=&quot;Hello World!&quot;/&gt;

  2. CDATA sections

    /// <![CDATA[<TextBlock Text="Hello World!"/>]]>

With the first option, Visual Studio Intellisense will properly show the unescaped XML sequence.

like image 67
Paolo Moretti Avatar answered Dec 11 '22 11:12

Paolo Moretti