Saturday, April 9, 2016

Simple Xamarin Forms Demo App

A Simple Xamarin Forms Sample App

Recently I presented a short Xamarin Forms introduction.  It was only a short 30min taster, but I wanted to ensure I was showing something a little deeper than a simple "Hello World" App.  I personally find those kind of demo's too basic and not enough to get a taste of how using a technology is going to suit real world work.

Here's the App I built for the demo:

Demo points

  1. Solution structure of a Xamarin Forms App.
  2. Entry point - how does it start and choose the first Xaml page?
  3. Anatomy of a Xaml page.
  4. Xaml Basics
    1. Root elements, in this case a ContentPage. Other options are MasterDetailPage, TabbedPage, and NavigationPage.
    2. Setting Page Padding to different values for each platform.
    3. Layout Controls: In this case we're using a AbsoluteLayout and a StackLayout.  Another common Layout is Grid.
    4. Labels, Styles, and basic value DataBinding.
    5. Using different buttons for iOS and Android.  The Material Design Floating Action Button.
    6. Binding can be used for more than value binding. The FAB has a bound reference to the ListView.
  5. Code Behind
    1. Great to get started
    2. Event Handlers
    3. Best Practice - Code behind doesn't scale well.  The MVVM pattern.
  6. A look at more advanced customisation for Android. A Custom Renderer to create a Floating Action Button.
  7. Tooling - What do we need to develop and test an App?

No comments:

Post a Comment