Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Autocomplete when editing android layouts in Visual Studio with Xamarin

I'm currently running a latest Xamarin.Android trial installation with up-to-date Visual Studio 2012.

When opening .axml file in visual studio I can see a visual designer and can use it normally, when I switch to the "Source" tab I can see a perfectly fine layout xml with syntax highlighted and whatnot.

The problem is, that auto-complete can only suggest XML comment and CDATA elements, nothing else.

Is there a way to turn android-aware auto-complete in Visual Studio? I recall Xamarin Studio being able to auto-complete layouts, but when opening a solution, which was edited in Visual Studio, Xamarin Studio also fails to auto-suggest.

Any ideas? Thanks in advance.

EDIT: Switched to the paid version and the problem still persists in both Xamarin and Visual Studios.

like image 788
Dmitriy Avatar asked Apr 18 '13 09:04

Dmitriy


3 Answers

In Xamarin studio you may simply right-click on axml file and select - "Open with/Source Code Editor" Unfortunately, i can't check it in Visual Studio.

like image 96
showyoumuck Avatar answered Jan 02 '23 21:01

showyoumuck


Actually you can easily add the Intellisense-like feature in visual studio for your android layout.

The step by step tutorial is here https://kb.xamarin.com/customer/portal/articles/1920119-how-do-i-enable-intellisense-in-android-axml-files-

like image 20
Miiite Avatar answered Jan 02 '23 21:01

Miiite


After so many struggles, the only solution, which worked out for me after all, was to use IntelliJ IDEA or Eclipse to edit my android layouts, and writing code-behind in Xamarin Studio. Ditching Xamarin and going back to development with Java worked out even better.

like image 33
Dmitriy Avatar answered Jan 02 '23 22:01

Dmitriy