2
About the Author
Jesse Liberty
Jesse Liberty is a Master Consultant for Falafel Software, an author, and he creates cours-
es for Pluralsight. Jesse hosts the popular ‘Yet Another Podcast’ and his blog is required
reading. He was a Senior Evangelist for Microsoft, a XAML Evangelist for Telerik, a Microsoft
MVP, Distinguished Software Engineer at AT&T; Software Architect for PBS and Vice Presi-
dent of Information Technology at Citibank.
Jesse can be followed on twitter at @JesseLiberty
Falafel Software Inc., a platinum Xamarin partner, has been providing custom software development,
consultation, and training services worldwide since 2003. Our team of Microsoft Certied Professionals
will exceed your expectations when you choose any of our services. Whether you need help moving to
the cloud, a suite of mobile applications, or assistance with any of our partner’s technology, the Falafel
family is ready to help. Contact us to discuss your technology needs. www.falafel.com
Need help with Xamarin?
We’ve got you.
Learn more now
or, call us at 831-462-0457
4
Contents
Part 1: Forms .....................................................................................6
Forms .....................................................................................................6
Two Approaches .....................................................................................6
Getting Started .......................................................................................6
Creating the UI ........................................................................................9
App.cs ....................................................................................................10
Details Page ...........................................................................................10
Run It ......................................................................................................11
Part 2: Forms and XAML ....................................................................11
Views ......................................................................................................12
Setting Up Navigation .............................................................................14
Part 3: Xamarin Data Binding - Hello XAML Programmers! ................. 15
What We’ll Build .....................................................................................16
The Book Class ......................................................................................16
Creating the Dummy Data .......................................................................18
Displaying the Books ..............................................................................19
Book Details ...........................................................................................21
Two Way Binding ....................................................................................22
Xamarin iOS Storyboards - Geng Started ........................................22
Getting Started .......................................................................................22
Setting Properties ...................................................................................24
Dismissing the Keyboard ........................................................................24
Xamarin iOS Storyboards - Events ..........................................................25
Xamarin Storyboards - Navigaon .....................................................26
Segues ...................................................................................................26
Creating New Controllers ........................................................................27
Passing Data ..........................................................................................27
Displaying the Books ..............................................................................28
Storyboards and Custom Cells ...........................................................30
Subclassing UITableViewCel ...................................................................30
Passing in Books ....................................................................................32
5
Overriding GetCell ...................................................................................33
Learning Xamarin - Building An App ..................................................34
The APP .................................................................................................34
The Data Model ......................................................................................34
M-V-VM ..................................................................................................37
Views ......................................................................................................38
Adding Criteria ........................................................................................40
Details, Details ........................................................................................41
Xamarin Forms: Converng Integers ..................................................43
Moving Add Criterion ..............................................................................45
Adding Items ..........................................................................................46
Tinkering with our app ......................................................................48
Importance Of Criteria .............................................................................49
Learning Xamarin - Adding Persistence with SQLite ...........................50
Adding the Database To The Project .......................................................51
Saving Items and Criteria To The Database .............................................53
Wiring It Up .............................................................................................53
iOS Specic ............................................................................................54
Calling Into The Database .......................................................................55
Restoring Items ......................................................................................56
Not Rocket Science ................................................................................57
Learning Xamarin - Extending the App & DB Tables ...........................57
Updating the Data ..................................................................................58
Appliances ..............................................................................................58
Patterns ..................................................................................................62
Learning Xamarin - Adding Tabbed Pages...........................................62
Android Too ............................................................................................63
Xamarin Forms and HTTP .......................................................................64
Creating the Model .................................................................................64
Creating the View Model .........................................................................64
Creating the View....................................................................................65
Services ..................................................................................................65
Xamarin Forms: Web Viewer .............................................................68
Wiring It Up .............................................................................................69
Closing ..............................................................................................69