Highlighting kills my Razor syntax in Visual Studio 2010

走远了吗. 提交于 2019-11-30 11:17:47
Clay Compton

You should be able to change the text background for Razor code by:

  1. Opening Visual Studio Options (Under Tools -> Options),
  2. Selecting "Fonts and Colors" (Under Environment in the treeview at left)
  3. Changing the dropdown box at top to "Text Editor" (if that isn't the value already),
  4. Choosing "Razor Code" from the "Display Items" listbox, and
  5. Changing the background color to your liking and clicking "OK" to apply the change.

There's also an "HTML Server-Side Script" setting that controls the background color of the Razor code delimiters (the @ expression and similar expressions that mark the beginnings of code blocks.)

HTH,
Clay

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!