Mobile Apps with Visual Basic & Xamarin.Forms

Avatar

Craig

If you are a Visual Basic developer, your options for becoming a mobile developer have historically been limited to targeting Windows Phone; however, with Xamarin.Forms, Portable Class Libraries, and Visual Studio, developing iOS and Android apps entirely in Visual Basic has become a real possibility.

Last year I wrote about how Visual Basic Portable Class Libraries (PCLs) can be used in Xamarin apps. Xamarin.iOS and Xamarin.Android can access business logic written in Visual Basic PCLs, while writing the platform-specific code (including the user interface) in C# (or F#) on the Xamarin platform.

Visual Basic Xamarin.Forms

Since then we’ve released Xamarin.Forms, which makes it possible for an entire app—from business logic to user interface—to be written in a PCL and shared across platforms. This means that it’s become possible to write entire mobile applications in Visual Basic in Visual Studio using Xamarin.Forms. The Xamarin developer portal has instructions on creating a Visual Basic project from the Xamarin.Forms new project template. A “Basic” App class is shown here:

Once you’ve created a new project and converted it to Visual Basic (or just started with the sample) your entire application can be written in Visual Basic. The code below represents a simple ContentPage written in Visual Basic. You can use this as a basis for new pages in your apps:

Xamarin doesn’t implement support for the Visual Basic language directly, so you can’t use Xamarin Studio for these projects; however, if you’re a Visual Basic programmer, or have existing Visual Basic code you’d like to mobilize, there’s never been a better time to get started with mobile development with Xamarin.Forms! And, of course, if you have published a Windows Phone application written in Visual Basic, there’s still time to take advantage of our free subscriptions for Windows Phone Developers promotion before August 31, 2015.

Avatar
Craig Dunn

Principal Program Manager, Mobile Developer Tools

Follow Craig   

0 comments

    Leave a comment