Deep Dive into the Quick Start of Xamarin.Forms Multiscreen

How to expand the Xamarin.Forms Phoneword to a Multiscreen App:

  1. Add a new ContentPage XAML, CallHistoryPage, as the second page. ListView of the called phone numbers are programmed in the StackLayout of the CallHistoryPage.xaml to show the numbers list in the second page.
  2. Modify App.xaml.cs as below:
    1. In multiscreen App, NavigationPage class manages the stack of Page objects. So, to show MainPage firstly after launching the App, modify “MainPage = new MainPage();” to “MainPage = new NavigationPage(new MainPage());”.
    2. To display and interact with the phone number data, some code about Data Binding are added in this file. Those are a little bit difficult to understand for me, so I will study them more deeply later.
  3. Add the OnCallHistory button to move the CallHistoryPage in the MainPage.xaml.
  4. Add some code with PushAsync method of NavigationPage class in MainPage.xaml.cs to move the CallHistoryPage when OnCallHistory button is tapped.

コメント

このブログの人気の投稿

Get the Color Code from an Image Pixel

PCL Storage (1)

Prolog Interpreter