private async void OnAddCommandExecuted() { if (string.IsNullOrEmpty(TaskTitle) || string.IsNullOrEmpty(TaskContent)) { await this.PageDialogService.DisplayAlertAsync("Warning", "Enter both", "OK"); return; } ToDoItem toDoItem = new ToDoItem() { Title = TaskTitle, Content = TaskContent, CreatedTime = DateTime.Now }; LocalService.CreateTask(toDoItem); await this.NavigationService.GoBackAsync(); }