5

If you hover over something (class, method,...) that's got xml documentation (///<summary></summary>) in VS17 (15.6.2), you get this little popup that shows the comments properly formatted.

I tried to make a list (copied from here):

/// <summary>Here is an example of a bulleted list:
/// <list type="bullet">
/// <item>
/// <description>Item 1.</description>
/// </item>
/// <item>
/// <description>Item 2.</description>
/// </item>
/// </list>
/// </summary>

But the popup only displays it in a single line:

Here is an example of a bulleted list: Item 1. Item 2.

I also tried to add <term> to it (like here) but all I get is:

enter image description here

I've tried with the other types too (and also without) but no change. Is this a bug? How do I fix it?

Neph
  • 1,823
  • 2
  • 31
  • 69
  • If you want to show descprition as multiline text you can set paragraph break - [SOURCE](https://stackoverflow.com/questions/7279108/how-to-add-a-line-break-in-c-sharp-net-documentation) – Wojtman Nov 14 '18 at 11:15
  • 1
    @Wojtman I already tried ``, which seems to be broken a bit too: Instead of just adding a single line break (like you'd expect, see the 2nd screenshot [here](https://stackoverflow.com/q/44565660/2016165)) it adds 2, which makes it looks even worse. – Neph Nov 14 '18 at 11:29
  • I agree. I wish the formatting of summaries on-hover was a little more robust. We often define new (one-line) classes that inherit from another class with generic types (using StrangeIOC signalling system - if you were curious). It usually looks something like: ```public class SomeCustomSignal : Signal { }``` I would like to be able to list out what the signal parameters are, similarly to any function, but I can't get it to look nice. – Broper May 31 '19 at 22:19
  • still broken; no list/table views in the tooltip in VS17 after a few years! – Mehdi Dec 30 '20 at 07:20
  • This was finally fixed in Visual Studio 2019! – Neph Jul 22 '21 at 08:56

1 Answers1

1

This is my workaround:

/// <summary>Here is an example of a bulleted list:
/// <list type="bullet">
/// <item>
/// <description><para>&#x02022; Item 1.</para></description>
/// </item>
/// <item>
/// <description><para>&#x02022; Item 2.</para></description>
/// </item>
/// </list>
/// </summary>
Alex David
  • 11
  • 2
  • Interesting, that's a nice workaround and looks exactly the same as the comments that were finally fixed in VS 2019. – Neph Jul 22 '21 at 08:58