Exemplo n.º 1
0
        public UpdatePage(ObservableItem item)
        {
            InitializeComponent();
            titleCell.Text       = item.Title;
            descriptionCell.Text = item.Description;

            updateButton.Clicked += (object sender, EventArgs e) =>
            {
                item.Title       = titleCell.Text;
                item.Description = descriptionCell.Text;
                Navigation.PopAsync();
            };
        }
Exemplo n.º 2
0
        public InsertPage(ObservableCollection <ObservableItem> items)
        {
            InitializeComponent();

            insertButton.Clicked += (object sender, EventArgs e) =>
            {
                ObservableItem item = new ObservableItem
                {
                    Title       = titleCell.Text,
                    Description = descriptionCell.Text
                };

                items.Add(item);
                Navigation.PopAsync();
            };
        }