Beispiel #1
0
		async void OnItemSelected (object sender, SelectedItemChangedEventArgs e)
		{
			var todoItem = e.SelectedItem as TodoItem;
			var todoPage = new TodoItemPage ();
			todoPage.BindingContext = todoItem;
			await Navigation.PushAsync (todoPage);
		}
Beispiel #2
0
        async void OnItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            var todoItem = e.SelectedItem as TodoItem;
            var todoPage = new TodoItemPage();

            todoPage.BindingContext = todoItem;
            await Navigation.PushAsync(todoPage);
        }
Beispiel #3
0
		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);
		}
Beispiel #4
0
        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);
        }
Beispiel #5
0
        public App()
        {
            TodoManager = new TodoItemManager ();
            MainPage = new NavigationPage (new TodoListPage ());

            MessagingCenter.Subscribe <NSUserActivitySearch.App, string> (this, "ShowItem", async (sender, arg) => {
                var todoItems = TodoManager.All;
                var item = todoItems.FirstOrDefault (i => i.ID == arg);

                if (item != null) {
                    await MainPage.Navigation.PopToRootAsync ();
                    var todoItemPage = new TodoItemPage ();
                    todoItemPage.BindingContext = item;
                    await MainPage.Navigation.PushAsync (todoItemPage);
                }
            });
        }
Beispiel #6
0
        public App()
        {
            TodoManager = new TodoItemManager();
            MainPage    = new NavigationPage(new TodoListPage());

            MessagingCenter.Subscribe <NSUserActivitySearch.App, string> (this, "ShowItem", async(sender, arg) => {
                var todoItems = TodoManager.All;
                var item      = todoItems.FirstOrDefault(i => i.ID == arg);

                if (item != null)
                {
                    await MainPage.Navigation.PopToRootAsync();
                    var todoItemPage            = new TodoItemPage();
                    todoItemPage.BindingContext = item;
                    await MainPage.Navigation.PushAsync(todoItemPage);
                }
            });
        }