Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 357
Dean Chalk Avatar asked Apr 03 '14 09:04

Dean Chalk


People also ask

How do I disable XAML designer?

You can disable the XAML designer using the Options dialog box. To do so, open the dialog by selecting the Options item from the Tools menu. Once visible, expand the "Text Editor" section, then the "XAML" section at the left of the dialog box. Select "Miscellaneous" to show the correct options.

Does XAML work on net framework?

As applied to the . NET Core programming model, XAML simplifies creating a UI for a . NET Core app. You can create visible UI elements in the declarative XAML markup, and then separate the UI definition from the run-time logic by using code-behind files that are joined to the markup through partial class definitions.

How do I enable XAML designer?

To open this page, choose the Tools menu and then choose Options. To access the XAML Designer property page, choose the XAML Designer node. Settings for the XAML Designer are applied when you open the document. So, if you make changes to the settings, you need to close and then reopen Visual Studio to see the changes.

What is XAML in C#?

C# interfaces - Blazor, API, UWP, WPF, Office XAML stands for Extensible Application Markup Language. It's a simple and declarative language based on XML. In XAML, it very easy to create, initialize, and set properties of objects with hierarchical relations.


2 Answers

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.

like image 181
FishySwede Avatar answered Oct 09 '22 23:10

FishySwede


Found this on MSDN. There is a specific setting to disable this.

Open the Options dialog by selecting Tools > Options, and then select Text Editor > XAML > Miscellaneous.

Uncheck the Show errors detected by the XAML designer check box.

Article from MSDN

like image 28
LawMan Avatar answered Oct 09 '22 23:10

LawMan