Exemplo n.º 1
0
        public ItemsPage(ItemsViewModel viewModel)
        {
            this.viewModel = viewModel;
            Title          = viewModel.Title;
            ToolbarItems.Add(MenuItemMaker.NewToolbarItem(AddItem_Clicked, VariablesTexts.TOOLBAR_NAME_ADD, VariablesGlobal.IMAGE_ADD));

            // Update ItemsPage UI once ExecuteLoadItemsCommand Task complete
            MessagingCenter.Subscribe <ItemsViewModel>(this, VariablesTexts.MESSAGE_LOAD_ITEMS_EXECUTED, (sender) =>
            {
                PageLayout();
            });
        }
Exemplo n.º 2
0
        // Set up NewItemPage UI layout
        private void PageLayout()
        {
            Title = VariablesTexts.TOOLBAR_NAME_ADD;

            StackLayout stackLayout = LayoutMaker.NewStackLayout(new Thickness(0, 0, 0, 0));

            entryName  = InputViewMaker.NewEntry();
            editorText = InputViewMaker.NewEditor();

            stackLayout.Children.Add(ViewMaker.NewLabelString(VariablesTexts.LABEL_ITEM_NAME, VariablesGlobal.TEXT_SIZE_LARGE));
            stackLayout.Children.Add(entryName);
            stackLayout.Children.Add(ViewMaker.NewLabelString(VariablesTexts.LABEL_ITEM_TEXT, VariablesGlobal.TEXT_SIZE_LARGE));
            stackLayout.Children.Add(editorText);

            ToolbarItems.Add(MenuItemMaker.NewToolbarItem(Save_Clicked, VariablesTexts.TOOLBAR_NAME_SAVE));
            Content = stackLayout;
        }