Welcome to Xamarin.Forms (Hello World)

For the first application, lets start out easy and create the old familiar "Hello World" application but in this case it will be the Welcome to Xamarin Forms application.

Launch Visual Studio. Select File, New, Project...

Select C#, Cross-Platform, Blank Xaml App (Xamarin.Forms Portable) and press OK.

Select the Target Version and the Minimum Version.

A Xamarin.Forms Application is created with mulitple platforms (Android, iOS, UWP, Windows, WinPhone).

Right click on the solution and select "Manage NuGet Packages for Solution..."

The template has references to a older version of Xamarin.Forms and the .NET Core. Let's go ahead and update to the latest. Select the Updates tab and then check Microsoft.NETCore.UniversalWindowsPlatform and Xamarin.Forms"

Select OK.

Select IAccept.

The NuGet package manager will update the selected specified packages.

Right click on the android project and select "Set as StartUp Project".

Select the 5.7" Marshmellow (6.0.0) XHDPI (Android 6.0 -API 23) device and build/run the application in the emulator by clicking on the green triangle.

The source code is located on my GitHub site (wpbest/WelcomeToXamarinForms): https://github.com/wpbest/WelcomeToXamarinForms

No Comments

Add a Comment

As it will appear on the website

Not displayed

Your website