How to change the color "name" -variable for # area

I searched all around, but I can not find an option to change the color "name" after #region in VS2012.

For example, if I have the following code:

#region Test some code CallSomeCode(); #endregion 

How to change color Test some code ?

+7
source share
3 answers

Having looked at this and other posts on the Internet, this is what worked in VS 2015 for me:

#region and keywords #endregion: Preprocessor keyword [applies immediately]

Text after the #region keyword: Preprocessor text [applies immediately]

Collapsed area: Collapsed text (collapsed) [should restart Visual Studio]

Picture

+3
source

In VS 2012, the following worked for me:

  • To change the color of # region / # endregion - set the "Preprocessor keyword"
  • To change the text after # regions when collapsing - set "Collapsed text (folded)"
  • To change the text when expanding - install "Plain Text", but be careful, this will also change; ([etc

You may need to restart VS in order to take effect.

Personally, I would like to have two types of comments: one for disabling code and one for explanatory notes. These are two different things, but in most languages ​​they are treated the same way.

+9
source

From the Tools menu, select Option Then Environment And Fonts and Colors

In the list of displayed items, select Collapsible tex t and change the color.

Edited

you can change the color of #region with Tools>Options>Environment>Fonts and Colors change the Preprocessor Keyword , but you cannot change the color of the text before #region

+2
source

All Articles