Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8220985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:44:25+00:00 2026-06-07T13:44:25+00:00

Possible Duplicate: I can't edit selected text foreground color in Visual Studio 2010. Anyone

  • 0

Possible Duplicate:
I can't edit selected text foreground color in Visual Studio 2010. Anyone know how to do this?

In the Options->Environment->Fonts and Colors dialog you can choose Selected Text in the Display Items listbox, but this only allows you to change the Item background property.

How does one change the text color, so that for example I can have white text on a blue background when I select an item? Also, is there a way to bold the text (the Bold box is disabled also).

Note: Here is the question that asks about the background color change.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T13:44:28+00:00Added an answer on June 7, 2026 at 1:44 pm

    The foreground color in the VS2010 editor is not set in one place but in many within the Options Form. If you have Resharper installed it also sets some foreground properties. The reason VS2010 does this is to allow individual items (words) within the foreground to express different colors depending on their type (e.g. comments, value types, enums etc.) even when they are selected. In other words VS2010 applies a priority to the foreground color for these specific types over the generic selected text color format.

    For instance, when you look at the Fonts and Colors dialog you will notice the entry for User Types. On my VS2010 its RGB value is RGB(43, 145, 175) which looks like teal. If I change that color to Red, the User Types on my editor’s foreground color changes to Red and remains Red even when with the selection area.

    In some instances VS2010 will override the foreground color such as applying a breakpoint to a line. On my VS2010 enabled breakpoints when in editing mode have a white foreground color, regardless of the terms in the line.

    To answer your question of how one would change the foreground color for all selected text, VS2010 does not support this out of the box.

    I wrote a VS2010 Extension as outlined here. I used the example code as is and added the lines:

            selectedText[EditorFormatDefinition.ForegroundBrushId] = Brushes.Green;
            formatMap.SetProperties("Selected Text", selectedText);
    

    …but this did not change the foreground color of selected text to green. It stayed black. This is probably due to the VS2010 WPF editor using a Priority Order for each format and one or more other formats overriding the selected text foreground color.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Can you animate a height change on a UITableViewCell when selected? This
Possible Duplicate: Can main function call itself in C++? I found this problem very
Possible Duplicate: “Least Astonishment” in Python: The Mutable Default Argument Edit: This has nothing
Possible Duplicate: How can I export tables to excel from a webpage EDIT: Just
Possible Duplicate: Can I go back and edit comments on an SVN checkin? I've
Possible Duplicate: php edit for Cufon font replacement I am reposting this due to
Possible Duplicate: How can I edit my code to echo the data of child's
Possible Duplicate: How to get the text of the selected option of a select
Possible Duplicate: How to edit image for e.g. permanently adding text on the image
Possible Duplicate: Group files in Visual Studio The problem is, that I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.