Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the background color for the selected XAML node in Visual Studio 2012

I have downloaded the VS2012 theme designer and am using a dark theme. In the designer I click on the WPF element in the designer and the corresponding text element in the XAML code editor should be selected. However the normal background color of the editor is dark dark grey and the background color of the selected item seems to be black. There is little or no contrast.

My question is, out of the hundreds of elements in the theme designer does anybody know the correct one to change to fix this problem?

like image 613
bradgonesurfing Avatar asked Jun 25 '13 07:06

bradgonesurfing


People also ask

How do I change the background color in Visual Studio 2012?

On the menu bar, select Tools > Options. In the options list, select Environment > General. In the Color theme list, choose between the default Dark theme, the Blue theme, the Blue (Extra Contrast) theme, and the Light theme. Or, choose the Use system setting option to select the theme that Windows uses.

How do I change the background color in WPF?

Click the C1ColorPicker control once to select it. Navigate to the Properties window, and click the Background drop-down arrow, and choose Red or another color in the color picker.


2 Answers

In VS 2013, which I assume is the same as VS 2012, it is sufficient to click

Tools -> Options -> Fonts and Colors -> Text Editor -> Inactive Selected Text

and set the set the colors for that element type.

like image 166
markltx Avatar answered Oct 05 '22 12:10

markltx


First create (or download and import) a custom theme. Then you need two steps to change the color:

  1. Set the color in the theme designer: Text Editor → Inactive Selected Text → Background. Save it and apply your custom theme by double click.

  2. Select: Tools -> Options -> Fonts and Colors -> Text Editor -> Inactive Selected Text -> Item Background -> Default

Every time you change the color in the theme designer, the 2nd step has to be repeated. Maybe it's sufficient to do only the 2nd step, but I did not try it.

like image 32
al-bex Avatar answered Oct 05 '22 12:10

al-bex