O'Reilly logo

Xamarin Blueprints by Michael Williams

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building the user interface

It's now time to build the user interface screens; we are going to start by building the view-models. Inside the FileStorage.Portable project, add a new folder called ViewModels, add a new file called MainPageViewModel.cs, and implement the following:

public class MainPageViewModel : ViewModelBase
  {
     #region Private Properties
     private string _descriptionMessage = "Welcome to the Filing Room";
     private string _FilesTitle = "Files";
     private string _exitTitle = "Exit";
     private ICommand _locationCommand;
     private ICommand _exitCommand;
     private ISQLiteStorage _storage;
     #endregion
  }

We include the ISQLiteStorage object in this view-model because we will be creating the database tables when this view-model is created. Don't forget ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required