async void OnItemSelected (object sender, SelectedItemChangedEventArgs e) { var todoItem = e.SelectedItem as TodoItem; var todoPage = new TodoItemPage (); todoPage.BindingContext = todoItem; await Navigation.PushAsync (todoPage); }
async void OnItemSelected(object sender, SelectedItemChangedEventArgs e) { var todoItem = e.SelectedItem as TodoItem; var todoPage = new TodoItemPage(); todoPage.BindingContext = todoItem; await Navigation.PushAsync(todoPage); }
async void OnAddItemActivated (object sender, EventArgs e) { var todoItem = new TodoItem () { ID = Guid.NewGuid ().ToString () }; var todoPage = new TodoItemPage (true); todoPage.BindingContext = todoItem; await Navigation.PushAsync (todoPage); }
async void OnAddItemActivated(object sender, EventArgs e) { var todoItem = new TodoItem() { ID = Guid.NewGuid().ToString() }; var todoPage = new TodoItemPage(true); todoPage.BindingContext = todoItem; await Navigation.PushAsync(todoPage); }
public App () { TodoManager = new TodoItemManager (); MainPage = new NavigationPage (new TodoListPage ()); MessagingCenter.Subscribe <CoreSpotlightSearch.App, string> (this, "ShowItem", async (sender, arg) => { var todoItems = TodoManager.All; var item = todoItems.FirstOrDefault (i => i.ID == arg); await MainPage.Navigation.PopToRootAsync (); var todoItemPage = new TodoItemPage (); todoItemPage.BindingContext = item; await MainPage.Navigation.PushAsync (todoItemPage); }); }
public App() { TodoManager = new TodoItemManager(); MainPage = new NavigationPage(new TodoListPage()); MessagingCenter.Subscribe <CoreSpotlightSearch.App, string> (this, "ShowItem", async(sender, arg) => { var todoItems = TodoManager.All; var item = todoItems.FirstOrDefault(i => i.ID == arg); await MainPage.Navigation.PopToRootAsync(); var todoItemPage = new TodoItemPage(); todoItemPage.BindingContext = item; await MainPage.Navigation.PushAsync(todoItemPage); }); }