Xamarin: Multi Platform Development

In the past I wrote some applications for the Windows Phone Platform. A few of them can be even found in the store. They are not perfect, but they gave me good insight in how it works. What does a little screen mean for development and what does it need to get in the store?


The first of the list is still in the store, but I lost the code Knipogende emoticon. Even then the rules of the store are tighten a lot, so this app would not stand these current rules.

I have a app for the Windows 8 platform too. Well in fact a few more, but they are not available for download. One is a demo app for Azure Mobile Services and one is the SDN evaluation app I talked about previously.



But anyway, I wanted to make an app for Android and iOS too. I have tried on my iMac with Xcode, but I got lost in Objective C language and could not find my way with the Apple tools. In the Microsoft world Xamarin is the environment to do it. A super tool to exploit your current skills for the other platforms.

I had this need to develop for the other platforms for some time, but could not find the time. But I found time. It is a kind of Hello World app, although the usage is bigger. But almost no shared code and no server side code.

At my former employer Ronald Hubert made a Scrum app for Windows Phone. I have used his idea and design of the cards. I did not reuse his code and wrote it myself.

You make two windows, draws the cards on the first and in the Click event you open the second window. In the second window you load the correct scrum card with a Click event to get back to the first window.

In code:

private void imageV_Tapped(object sender, TappedRoutedEventArgs e)
{     Frame.Navigate(typeof(DetailPage), "V");

So in the Click event of the image, tell where to navigate to with a parameter. Clean and simple Knipogende emoticon


For Android development you have two choices. Or you develop with Visual Studio or you develop with Xamarin Studio. The first is more the way you always work as a C# developer. I haven chosen to work with Xamarin Studio.

In fact the same ritual like Windows Phone is used.

ImageButton imButton1 = FindViewById<ImageButton> (Resource.Id.imageButton1);
imButton1.Click += new EventHandler (PictureBtn_Click);
void PictureBtn_Click(Object sender, EventArgs e)
	ImageButton imgbut = (ImageButton)sender;
	var intent = new Intent (this, typeof (NextScreenActivity));
	intent.PutExtra ("picture", (imgbut.Tag == null ? "" : imgbut.Tag.ToString()));
	StartActivity (intent);

Different is, you need to find the button on screen (like in HTML) and connect to an event. In the event a new Intent created and with the Intent an Activity must be started.



Apple/iOS uses a Story board and forces MVC. There lot’s of events and codeblocks for the iOS part.


Screen Shot 2015-02-14 at 13.37.40

Although I could use C#, it was three time different developments.

There is also something like Xamarin Forms. Then the frontend for the different operating systems will be more alike. That will be my next project.

To get the apps in de Stores wasn’t that easy like before. Windows Phone and Android were much alike, but the Apple appstore was more trouble and takes more time to be validated.

To download this app::