简体   繁体   English

2012年Visual Studio中C#倒塌区域的颜色

[英]Colors for C# collapsed region in visual studio 2012

I´m using Visual Studio 2012 Ultimate version 11.0.51106.01 Update 1. I configured black as background color and white as foreground color but C# collapsed regions are appearing with a black foreground, making it invisible. 我使用的是Visual Studio 2012 Ultimate版本11.0.51106.01 Update 1.我将黑色配置为背景颜色,将白色配置为前景色,但C#折叠区域显示为黑色前景,使其不可见。 How can I correct this? 我怎么能纠正这个?

Expanded regions with the correct colors: 具有正确颜色的扩展区域:

expanded region

When collapsed, the region becomes invisible (black foreground and black background): 折叠时,该区域变为不可见(黑色前景和黑色背景):

collapsed region

I had the same problem. 我有同样的问题。 I found that "Collapsed text (Collapsed)" does indeed work. 我发现“折叠文本(折叠)”确实有效。 The trick is that you have to restart Visual Studio for the changes to be applied. 诀窍是您必须重新启动 Visual Studio才能应用更改。 I'm not sure why this is the case (since all other color changes happen immediately), but I've verified it by changing it a couple of times. 我不确定为什么会出现这种情况(因为所有其他颜色变化都会立即发生),但我已经通过改变它几次验证了它。

I've tested it using both the built-in UI, as well as the Visual Studio 2012 Color Theme Editor extension. 我已经使用内置UI以及Visual Studio 2012 Color Theme Editor扩展来测试它。 Both cases require a restart (though I can't be sure if merely having the extension installed is causing it to behave poorly). 两种情况都需要重新启动(虽然我不能确定是否只是安装了扩展程序导致它表现不佳)。

If you don't want to restart VS, just create a custom color for the "Collapsed text (Collapsed)" as described by ijprest. 如果您不想重新启动VS,只需为ijprest描述的“折叠文本(折叠)”创建自定义颜色。 This works for VS 2015. However, if you select one of the preset colors, you still have to restart VS. 这适用于VS 2015.但是,如果您选择其中一种预设颜色,则仍需要重新启动VS.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM