View Model in a Nutshell
The view model is the centerpiece of the Model-View-ViewModel pattern. When you're not using MVVM, your presentation logic is in the view (code behind), making harder to test because the logic is coupled to UI elements. On the other hand, when using MVVM, your presentation logic move into the view model, by decoupling logic from the view, you gain the ability to test logic without being bothered by UI elements.
Getting Started
To walk you through this tutorial, I created a Xamarin Forms app called WorkoutTube.
How to Create an Onboarding UI With Xamarin Forms
A user opens up your app for the first time, you got a chance to help him get familiar with it, how? you can show him a series of screens that explain what the app can do, that's onboarding in a nutshell.
In this tutorial, we are going to learn how to create an onboarding UI with Xamarin.Forms.
How To Use Constraint Layout in Xamarin.Android
What Is Constraint Layout?
Constraint helps to reduce the hierarchy of Views and increase the layout performance and flexibility of Views. It helps to design based on positing, size, dimension, and alignment of different Views. Constraint Layout has different attributes to set Views in the layout. You can set the View of any position of the layout easily, rather than that in Relative Layout. It supports Android and iOS platforms. Constraint layout comes under ViewGroup.
Advantages of Constraint Layout
- Flat View Hierarchy and no nested view.
- Better performance and high responsiveness.
- Align position, size, and alignment of the screen.
- Support Android (API 9) and iOS.
You may also like: Introduction to Xamarin.Forms for Android Developers (Part 1).
Some Important Constraint Layout Properties and Attributes
These attributes take only id or parent. Align view from any side of the target view.,
Register and Login Using SQLite in Xamarin.Forms
Introduction
This article demonstrates how to register, login, and update the user data in SQLite. We perform CRUD operations with SQLite DB in Xamarin.Forms and can easily store and retrieve objects from the local database.