How to customize Visual Studio UI – CloudSavvy IT

Visual Studio

Visual Studio offers plenty of customization options, albeit somewhat buried in the menus. You can apply custom themes, edit your styling rules, and add custom fonts with ligatures designed for programming.

Setting up a custom theme

Microsoft provides a few tools for this, but the newest and easiest to use is Visual Studio Color Theme Designer. There is also Color Theme Editor for older versions. Download and install the designer, then create a new VSTheme project:

Create new VSTheme project

The cool part of the designer is that it allows you to choose three base colors for most of the application. Visual Studio uses the same “Accent Color” system that the rest of Windows follows. If you are going with a dark theme, choose a shade of dark gray that you like for the primary color, then an accent color, then a slightly lighter shade of gray for the secondary color that is used for things like contours on buttons.

Choose three base colors for the application

The designer generates additional colors based on the ones you have entered and applies them all in the right places. You can click “Apply” at the bottom to set it as the current theme and see what it looks like.

However, if you would like to make some manual overrides, the next screen will show all the individual settings:

Individual settings

Note that these do not include syntax highlighting – you need to change these colors from the Settings menu.

Adjust syntax highlighting

The Theme Editor changes the colors to the Visual Studio interface, but the syntax highlighting settings are handled separately in the Settings menu. Open the settings from Tools> Settings.

You may notice that the background color has not changed; that’s because it’s set here. Under “Plain text” you can change the background color.

Change background color below "Simple text"

The settings for actually changing what you want are very buried, near the bottom under “User Members.” Here you will find the colors for changing methods, fields, parameters, classes, enums and pretty much everything.

Find colors for changing methods, fields, parameters, classes, topics, etc. Below "User members"

A very useful thing to do is to set a different color for parameters. By default, they are light blue, which is the same color as local variables. However, it is quite practical to be able to tell the difference between input arguments and locally defined variables. You can also specify different colors for fields and properties, both of which are not colored by default.

The colors for string literals are a little further up, as well as color settings for escape characters.

Colors for string literals

In addition to the basics, Visual Studio has specific elements for some language-specific settings, so if you see something that is still white, you can probably find it in the list.

Adding a custom font

By default, Visual Studio uses Consolas, which are monospaced but a bit basic.

Of course, there are better fonts out there specifically designed for programming. One of the most popular is FiraCode, which adds custom ligatures to enhance the appearance of common elements such as => and !=.

FiraCode font

You need to install the font you select on your system, and then select it from the “Fonts” menu in “Settings.”

Install the font you select, and then select it from the Fonts menu in the settings

You may need to restart Visual Studio for it to take full effect.

Leave a Comment