O'Reilly logo

Mastering Xamarin UI Development - Second Edition by Steven F. Daniel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying a list of planet names using C#

In this section, we will begin by creating the C# code that will be used to communicate with our PlanetaryApp user interface XAML for our MainPage. We will start by adding code in the MainPage code-behind file.

Let's take a look at how we can achieve this:

  1. Open the MainPage.xaml.cs code-behind file, ensure that it is displayed in the code editor, and enter in the following code snippet: 
      //      //  PlanetaryAppPage.xaml.cs      //  Displays Planetary Information in a Listview control from an array      //      //  Created by Steven F. Daniel on 17/02/2018.      //  Copyright © 2018 GENIESOFT STUDIOS. All rights reserved.      //      using System.Collections.ObjectModel;      using Xamarin.Forms;       namespace PlanetaryApp      { public partial ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required