2

I would like to know if is there a way to change the color of expanded regions' titles in VS2008. Even by using a third part plug-in.


#region My Region Title //I want this text to be in a customized color
public void Foo() {
    //Bla bla bla
}
#endregion

Does anyone know how to do it?

Rafael Romão
  • 1,788
  • 3
  • 20
  • 35

2 Answers2

3

In Tools>Options>Environment>"Fonts and Colors" change the "Preprocessor Keyword" item to change the region text color

In Tools>Options>Environment>"Fonts and Colors" change the "Collapsible Text" item to change the text after #region statement color

TikTak
  • 39
  • 2
  • Changing the "Collapsible Text" color only seems to change the color when the region is actually collapsed, which is exactly when you don't need it (there's already a very distinctive box around the text). – Jason Pratt Jun 11 '12 at 15:50
2

You can change the #region and #endregion preprocessor keyword under the 'Font and Colors' option under Tools-->Options... but I've never seen where you can change the text that you put after the tag.

You might want to poke around http://blogs.msdn.com/saraford/ and check out her blog since she is the queen of UI customization for visual studio.

post it if you find it :)

EDIT: I found this from a Microsoft website; "You can only change the preprocessor keywords. To get more advanced formatting you're going to have to look for third-party addons. I use CodeRush from DevExpress (http://www.devexpress.com) and it can do what you want. They have a free Express version available but I don't know if the region coloring is in the free version."

Christopher Klein
  • 2,773
  • 4
  • 39
  • 61