// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private async void Application_Launching(object sender, LaunchingEventArgs e) { // load the data from storage await viewModel.loadData(); //ViewModel.taskList = new System.Collections.ObjectModel.ObservableCollection<TaskItem>(); if (viewModel.taskList == null || viewModel.taskList.Count == 0) { TaskItem new1 = new TaskItem { dateTime = DateTime.UtcNow.ToString(), Details = "first one" }; viewModel.AddTaskItem(new1); viewModel.writeData(); } }