Is such a thing possible? If it's not clear what I'm talking about, here's a detailed example:
Take this quick utility class I wrote a few weeks ago (details omitted), along with the example I want to share:
public abstract class CommonOdinAttributesForOwnedType<TProperty, TParent> : OdinAttributeProcessor<TProperty>
{
//snip
}
//EXAMPLE IMPLEMENTATION (Recommended to be nested inside MyBaseType):
protected class BoolAttributesInsideMyBaseType : CommonOdinAttributesForOwnedType<bool, MyBaseType>
{
protected override List<Attribute> GetAdditionalAttributes()
{
return new List<Attribute>()
{
new ToggleLeftAttribute(), //add more desired attributes here
};
}
}
I have the following XML above the abstract class:
/// <summary>
/// Gives ALL objects of type TProperty drawn within classes derived from TParent a requested list of
/// Odin GUI attributes
/// <code>
/// //EXAMPLE IMPLEMENTATION (Recommended to be nested inside MyBaseType):
/// protected class BoolAttributesInsideMyBaseType : CommonOdinAttributesForOwnedType<bool, MyBaseType>
/// {
/// protected override List<Attribute> GetAdditionalAttributes()
/// {
/// return new List<Attribute>()
/// {
/// new ToggleLeftAttribute(), //add more desired attributes here
/// };
/// }
/// }
/// </code>
/// </summary>
Now, I could have SWORN that when I originally created the class, the tooltip looked like I wanted ... but maybe I'm hallucinating. At any rate, during this week's refactor (during which the file was moved/renamed and fed through ReSharper's cleanup), I noticed that the Intellisense tooltip now looks like hot garbage:
Adding <br/>
to the end of each line only helps a little:
...and I haven't been able to find a way to manually specify indentation the way <br/>
specifies new lines. I've also tried many combinations of <remarks>
, <example>
, <para>
, and various ways to nest the blocks, but nothing worked.
So: Is there any way to (ideally) get Visual Studio 2019 to actually parse whitespace found inside an XML documentation <code></code>
block, or (barring that) use some other block that manually adds indentation, the way I've manually added new lines with <br/>
? I've looked and looked, and can't find a way to do either.