Esempio n. 1
0
        private void buttonAddCategory_Click(object sender, RoutedEventArgs e)
        {
            var model = BookmarkerModel.GetDefault();
            var view = new CreateCategoryView();
            var popup = FlyoutUtils.CreateFlyout(this.BottomAppBar, (Button)sender, view);
            view.CreateClicked += (_, __) =>
            {
                if (!view.Validate())
                {
                    return;
                }

                var category = view.CreateBookmarkCategory();
                model.Categories.Add(category);
                var nowait = model.SaveAsync();
                popup.IsOpen = false;
            };

            popup.IsOpen = true;
        }
Esempio n. 2
0
        private void buttonAddCategory_Click(object sender, RoutedEventArgs e)
        {
            var model = BookmarkerModel.GetDefault();
            var view  = new CreateCategoryView();
            var popup = FlyoutUtils.CreateFlyout(this.BottomAppBar, (Button)sender, view);

            view.CreateClicked += (_, __) =>
            {
                if (!view.Validate())
                {
                    return;
                }

                var category = view.CreateBookmarkCategory();
                model.Categories.Add(category);
                var nowait = model.SaveAsync();
                popup.IsOpen = false;
            };

            popup.IsOpen = true;
        }