Turn Off XAML error underlining

This is a simple issue, and I hope someone can help

For reasons I don't think I need to explain, my XAML thinks it has some errors in it in the Visual Studio code editor (which shows as wavy blue underlines across most of my XAML).

Does anyone know how to turn this underlining off in Visual Studio 2012 ?

It's incredibly annoying, and makes my XAML hard to read

Thanks


I would suggest setting the editor for .xaml-files manually.

Go into

Tools->Options->Text Editor->File Extension

Write xaml in the Extension field and choose XML (Text) Editor from the Editor drop down and then click Add.

Your XAML files should now open as ordinary XML files, without error underlining.

You will probably loose a lot of the nice to have features of the XAML editor, but as far as I know (I've struggled a bit with this myself) it is the only way.


It is possible to hide the SquiggleShape by making the surrounding adornment layer hidden or collapsed using the Snoop tool.

To achieve this, the Snoop crosshair tool has to be dragged on the editor window with shift and ctrl keys pressed (keep them pressed a while when releasing mouse button). You should end on some Canvas (with the editor window highlighted), and below there is some ViewStack . Inside, there are some AdornmentLayer , one of which contains multiple SquiggleShape . In the properties section on the right side of the Snoop window, scroll to the Visibility row and select the value Hidden or Collapsed . Now, the squiggle lines are not visible any more.

This involves some manual work, but as long as the file stays open, the squiggle lines are hidden. In principle, it should be possible to write an extension which hides the lines automatically. However, at the moment I don't find the time to do this...


The only decent fix for this lame bug that I can find is right click on the xaml and click open with. Select source code editor (without with encoding). Not a great fix when you consider it gets rid of important errors. But it should help you read it better for the most part.

链接地址: http://www.djcxy.com/p/78508.html

上一篇: 使用HttpURLConnection下载html时出现奇怪的行为

下一篇: 关闭XAML错误下划线