private async Task UpdateCheckedTodoItem(TodoItem item)
 {
     // This code takes a freshly completed TodoItem and updates the database. When the MobileService 
     // responds, the item is removed from the list 
     await _todoTable.UpdateAsync(item);
     _itemsMobileService.Remove(item);
     //ListItems.Focus(Windows.UI.Xaml.FocusState.Unfocused);
     RefreshItensSource();
     await SyncAsync(); // offline sync
 }
 private async Task InsertTodoItem(TodoItem todoItem)
 {
     // This code inserts a new TodoItem into the database. When the operation completes
     // and Mobile Services has assigned an Id, the item is added to the CollectionView
     await _todoTable.InsertAsync(todoItem);
     _itemsMobileService.Add(todoItem);
     RefreshItensSource();
     await SyncAsync(); // offline sync
 }
 internal async void ButtonSaveClick(object sender, RoutedEventArgs e)
 {
     var todoItem = new TodoItem { Text = NewTodoText };
     await InsertTodoItem(todoItem);
 }