In Visual Studio 2022, static class names, static methods and static properties are bold by default. See this screenshot for example, the static method GetRequired
is bold as well as the InTestMode
static property and the AppConfig
static class:
I'd like none of them to be bold. But lets focus on the static method for a moment. I know I can go into Tools
> Options
> Environment
> Fonts and Colors
and change the configuration of how various text elements are colored including bolding. However I can not find the "Display Item" that controls the bolding of static code elements. I have unchecked bold for all "Display Items" that start with "User Members - " including the one for "User Members - Methods" (shown below)
However, I'm still seeing the static methods as bold in the C# editor. Which "Display Item" is the one that controls this bold treatment? Or is there a different way to turn this bold treatment off?
CodePudding user response:
As explained here, static items style is overrided in the Symbol - Static
entry. Since the bug is not fixed, the style will affect all static items.
For example: you can't have a static class declaration in bold without static members in bold too.