標籤:
原文 Get Intellisense for .axml files in Visual Studio
So in order to get some intellisense support for .axml files, we will add the required Schema.
Let‘s follow certain steps and see where we land:
1. Open the .axml file
2. Select Designer in the source view.
3. From the menu bar, select XML -> Schemas...
4. In the XML Schemas dialog, click on Add
5. Navigate to C:\Program Files (x86)\MSBuild\Xamarin\Android
6. Select android-layout-xml.xsd and click on Open.
7. Click on OK to confirm and dismiss the dialog.
------------------------------------
When you manually edit .axml files inside Visual Studio 2015 you don’t have any minimal intellisense support, and, as Visual Studio user, you know how frustrating is typing without any kind of help.
Since editing the same file using the XML editors brings you a ‘partial’ intellisense i tried to find what was the difference and finally found how to enable it also inside Android designer source view.
- 1-With Designer in source view, select Visual Studio’s xml menu and then Schemas…
- 2-Navigate to C:\Program Files (x86)\MSBuild\Xamarin\Android and select android-layout-xml.xsd file.
- 3-Click Ok to confirm and dismiss the dialog.
- Here’s what you now get when typing android: in source view:
Get Intellisense for .axml files in Visual Studio