Project Description
The AXML Code Generator is a project to automatically create C# code from an android view designer (AXML) file, which contains variables for all controls on the selected view.
Why?
Normally, to use a control like a button in your C# code (for android development), you have to find it in the resources with following code:
// Get our button from the layout resource
Button button = FindViewById<Button>(Resource.Id.MyButton);
This is very cumbersome and could be done automatically. And this is what the AXML Code Generator does.
How AXML Code Generator works!
- First you have to design your GUI in a gui designer like DroidDraw
- This will generate an AXML file and maybe an Java Class file
- Now you can generate a C# file with all the resource bindings for your project from the AXML
- Include the generated C# file into your project and use the benefits of intellisense!
Example
