Menu: Tools -> Options -> Environment -> Fonts and Colors
Zain's Note: Of all the subjects I have covered in the tips, this one has, by far, been one of the hardest to get nailed down. I hope this explanation helps you as much as it has helped me.
Ever wonder what the heck the difference is between the "Default" and "Automatic" options in the Fonts and Colors?
This is pretty straightforward. It uses the default colors set up by Visual Studio for the item selected. The colors are what Visual Studio defines as the default. You might call these the "normal" colors for want of a better term. The good news is you can always get these settings back no matter how bad you mess up the colors by just clicking the "Use Defaults" button.
This one is a LOT more interesting. Here is the definition of Automatic from the documentation (the bold emphasis is mine):
"Items can inherit the [.] color from other display items such as Plain Text. Using this option, when you change the color of an inherited display item, the color of the related display items also change automatically. For example, if you selected the Automatic value for Compiler Error and later changed the color of Plain Text to Red, Compiler Error would also automatically inherit the color Red."
Okay, so let's do it and show you what they mean. So let's see what the current settings for Plain Text are:
Notice, among other things, that the Item foreground is black. Now I'm going to change the foreground color to red:
Now let's hop over to Comment and see what the settings are there:
Notice that the Item foreground is green and is set to Default. Change the Item foreground to Automatic, this is what we get:
Notice that Comment inherited the Item foreground from Plain Text. So we clearly see the relationship between Plain Text and some of the other Display items. There are two things you need to be aware of:
- Not all items inherit from Plain text.
- Plain text inherits from the Windows System.
Let's address point #2. I've all the colors back to the default settings. So let's look at Plain Text again:
Plain Text has a default Item foreground of black again. But wait! Where does Plain Text's Default color come from? Let's see what happens if I change the Windows System colors. In this example I'm using Windows 7 so your settings may be elsewhere but all versions of Windows have this area we are going to. In the case of Windows 7, it's called "Change windows colors and metrics" as you can see here:
Which brings me to the "Window Color and Appearance" dialog:
Change the Item to "Window" and the font color to lime green:
Click "Apply" and then switch back to Visual Studio and notice that, among other things, Plain Text now has a default color of lime green:
So Plain Text Default color clearly inherits from the Windows System and then there are Display items inside Visual Studio that you can have inherit from Plain Text by setting their color to Automatic. So we can finally get a clear picture of the difference between Default and Automatic in the Fonts and Colors. At this point I would change all my colors back to what they were before we started this adventure together. Enjoy!