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