Call Us: +32 2 466 00 16
Email: info@u2u.be
Follow Us:

Building mobile apps with Xamarin Forms

5 days
UXAMAR
5 days

Upcoming Sessions

Date:

Format:

Price:

Location:

Book now

Date:

Format:

Price:

Location:

Book now

Interested in a private company training? Request it here.

Introduction to Xamarin Forms

If you have all the time and money in the world, you can build an Android app and an iOS app and maybe a Windows app in their native environment. But what if you don't have all the time in the world? How can you write an app that works on all mobile platforms? This is where Xamarin Forms comes in.

  • Mobile development options and problems
  • Building native UI's with Xamarin
  • A uniform way for creating UIs
  • Creating a Xamarin Forms project

Building the UI with XAML

XAML is the UI-language important for developers using the Microsoft developer stack. This module teaches students how to use the XAML language for building all kinds of applications, focusing on Xamarin Forms.

  • What is XAML?
  • XAML versus Code
  • Looking at XAML basic syntax
  • Understanding XAML attached properties
  • Nesting controls
  • Extending XAML through markup extensions
  • Understanding namespace mapping
  • Naming elements

Xamarin Form Controls Overview

This module gives you an overview of what kinds of controls are available and how to compose them together.

  • Examining the Class Hierarchy
  • The power of composability
  • Presentation Controls, Command Controls, Editing Controls
  • Collection Controls
  • the trouble with images
  • Understanding bindable properties

Controlling the layout

Mobile hardware becomes more and more diverse: big screens, double screens, high resolutions, low resolutions, .... This does require some special up-front design. In this module students will learn the different controls to keep a nice UI on all devices.

  • Absolute positioning using AbsoluteLayout
  • Flexible positioning using FlexLayout
  • Tabular positioning with Grid
  • Relative positioning with RelativeLayout
  • Stacking controls with StackLayout
  • Frames, Scrollview and Contentviews
  • What about dual screens ?

Reusability with Resources

How to reuse objects like colors, sizes, etc... in your application? XAML has re-use built in, so in this module students will learn how to re-use objects for their applications.

  • Re-using Objects through Resources
  • Resource Inheritance
  • Resource Dictionaries
  • Theming your application
  • Multi-lingual applications

Styles and Templates

How do you apply a style to your whole application ? Xaml makes this easy with styles and templates. In this module students will learn how to quickly customize their whole application with styles and templates.

  • Why we need Styles
  • Default, Implicit and Explicit Styles
  • Dynamic and Device styles
  • Styling using CSS
  • Theming an application
  • Introduction to control templates
  • Control Renderers
  • Effects

Animations

End users should easily see when an element on your UI is interactive, or when a new element has been added to your window. These things can easily be accomplished by Animations, which greatly improves the user experience. In this module students will learn how provide feedback to the user using animations.

  • Simple animations using ViewExtensions
  • Tweaking animations with Easing Functions
  • Creating custom Animations

Data Binding

In many cases some data needs to be displayed to the user. Changes in data need to be validated and captured efficiently. In this module students will learn how to use data binding to accomplish this.

  • The Need for Data Binding
  • Binding to Properties
  • Converting Data for Data Binding
  • Binding to Collections
  • Understanding Source and DataContext
  • Cell templates
  • Data Templates
  • Filtering, Sorting and Grouping
  • Compiled Bindings

Building Adaptive and Scalable Layouts

Multiple screen-size, portrait-mode, landscape-mode. How do we make a screen that looks good, and which adapts when you turn your screen ? You'll learn all about it in this chapter.

  • Fixed Versus Adaptive Layout
  • Working with the ViewStateManager and Adaptive Triggers

Navigation

An application with only one screen ? It happens, but most application have multiple screens. How do you jump between screens, how do you pass information between screens?

  • Navigation in Xamarin Forms
  • NavigationPage, TabbedPage, CarouselPage, FlyoutPage and modal pages
  • Shell Applications
  • Route-based navigation in Shell

Adding Device specific features

The fact remains that you are developing for different platforms with different possibilities and a lot of differences. How can you deal with that ?

  • Shared Projects
  • Dependency Injection
  • Xamarin Dependency Service
  • Effects
  • Using Platform specific controls

Xamarin Essentials

Xamarin Essentials is a library that helps you overcome the difference on the different platforms. Some functionalities normally need to be implemented against the different platforms. Essentials already has a whole bunch of functionalities covered for you.

  • Clipboard, Compass, Contacts, Device Information, Email
  • File Picker, File System Helpers, Geolocation
  • MainThread, Phone Dialer, Preferences, Secure Storage, Web Authenticator
  • And many many more

Process Lifecycle Management

Applications start and stop constantly. Sometimes you need to save some state for fetching again later. We'll see how to do that here

  • When Apps run
  • Handling Resume, Suspend and Termination
  • Supporting Different App Activation Scenarios
  • Splash Screens

Running in the background

Spotify keeps playing music, even when you don't see it on the screen. Runkeeper keeps tracking your speed, and location while not being active on the screen. Let's find out how your app can do that.

  • Application Lifecycle
  • Platform-specific considerations
  • Android's activity life cycle and Services
  • iOS backgrounding techniques
  • Backgrounding in Windows

Storing data

An application that downloads data to show you, every time you open it. How slow would that be? And what do you do with the entered data, when you are offline ? Store data on the device itself might help you in those scenarios.

  • Local storage
  • Working with SQLite
  • Using Entity Framework Core

Consuming Web Services

How to talk to webservices for getting and sending data? You'll learn all about it in this chapter

  • HttpClient and WebHttpRequest Class
  • Serialization and Deserialization

Data Validation

User input needs to be validated. Are all required properties provided? Do the values match the format? In this chapter you will see several options for validation.

  • INotifyDataErrorInfo
  • Data Annotations
  • Validation through events
  • Validation Templates

MVVM

MVVM is a design pattern which is very popular with technologies relying on declarative databinding, like XAML

  • What is the MVVM Pattern?
  • Using Commands instead of Event Handling
  • Defining the Model
  • Adding the ViewModel
  • Binding the View to the ViewModel

Behaviors

"If this then that", that's what behaviors are all about. It allows you to set up new functionality for an existing control in a declarative way.

  • Attached behaviors
  • Xamarin.Forms behaviors
  • Effect behaviors

Notifications

Everybody hates those constant on-screen notifications. Learn how to be annoying in this module!

  • Platform-specific notification mechanisms
  • Local notifications
  • Push notifications

Azure Notification Hub

Sending push messages to a device that is constantly moving is not a trivial task. Fortunately, Google, Apple and Microsoft provide their own solution for that. Once again you want to avoid doing things three times. That's where Notification Hubs come in.

  • Setting Up Platform Agnostic Push Notifications
  • Setting Up the App
  • Setting Up the Backend
  • Templates and Tags

Library Bindings

"You can do anything with C# that you can do with Java". But what if the code is already written in Java can I still use it in my Xamarin.Android app? Yes, you can. And you can do the same for iOS and Objective-C/Swift by using library bindings.

  • Integrating with third-party native libraries
  • Java Library Binding
  • Objective-C/Swift Library Binding

Adding your apps to the stores

Finally, your work is done. The last thing to do is add the app to the stores.

  • Adding apps to the Google store
  • Adding apps to the Apple Store
  • Adding apps to the Microsoft Store

Creating a mobile app is seldom creating one app. It's creating one app per platform. Learning different platforms is time consuming. Xamarin Forms allows us to do this in a much more efficient way. One language to rule them all: C#, while staying true to the platform. And only one UI paradigm to learn, in which we create the UI only once using XAML. Xamarin is based upon Mono, the open-source implementation of the .NET runtime. By combining reusable C# code and Xamarin Forms UI, Xamarin is able to create cross-platform native apps with all the features and power of the native platforms.

Participants of this course need to have a good understanding of C# and a notion of mobile app development. 

© 2021 U2U All rights reserved.