Search code examples
visual-studiovisual-studio-sdk

Where is the documentation on Visual Studio's decorators?


Note: This is not for Visual Studio Code, but for the full version of Visual Studio.

When developing extensions for Visual Studio Code, there is something called Decorators, which can add icons next to each line of code.

I'd like to do the same, but for Visual Studio instead. However, I can't find anything by the name "Decorators" in the documentation. Is it even called that within the full Visual Studio?

Can anyone point me in the right direction?

More specifically, I am interested in making an extension that can produce the icons seen here, and I am unsure what these icons are called in the scope of Visual Studio:

Icons next to lines


Solution

  • Vertical part where icons are shown is called "glyph margin" and icons in it are called "margin glyphs". Provided link will lead you to a MSDN walkthrough to create your own glyph for a line that has a "todo" text in a comment.