Search code examples
visual-studio-2022

Visual Studio 2022: Change colour of the positioning area in the vertical scroll bar


Vertical scroll bar

How do I change the colour of the area highlighted in the image that shows where you are or where you want to scroll to within the page being edited?


Solution

  • The only way I've found to be able to change this is to create your own theme since Visual Studio standalone doesn't seem to support this. Luckily, there is a nice extension called Visual Studio Color Theme Designer 2022 that allows you to do this. You can install the extension through the Extension manager in Visual Studio (Extensions → Manage Extensions).

    After installing it, open a new Visual Studio Window and select "VSTheme Project" as the project type. This might install some additional Visual Studio features (it should prompt you). It also closed all instances of Visual Studio in order to do so, so save any work first. I also ran into the hiccup of having to create a second VSTheme Project since the first one failed to load with the correct files.

    After doing this, select your base theme to start with (I assume Dark based off of your screenshot). Then go to the "All Elements" tab and find "ScrollBarThumbBackground". Select your color, and click the Apply button:

    thumb color

    After doing this, your theme should be applied, and your scroll bar "thumb" should be whatever color you chose:

    scrollbar

    You may need to tweak additional settings (like the hover color and click color) also.