Ejemplo n.º 1
0
        public Page_Command_Update(int id, string name)
        {
            this.id = id;

            var view = new StackLayout();

            view.Padding = new Thickness(5, 20, 5, 20);
            view.Spacing = 10;

            entry = new Entry
            {
                Text              = name,
                TextColor         = Color.Black,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                FontSize          = 14
            };

            var update_S = Structure_Button.Custom_Button("Обновить");

            update_S.Clicked += Update_S;

            view.Children.Add(entry);
            view.Children.Add(update_S);

            Content = view;
        }
Ejemplo n.º 2
0
        protected override void OnBindingContextChanged()
        {
            base.OnBindingContextChanged();

            if (BindingContext != null)
            {
                var source = BindingContext as Anime;

                var label = new Label {
                    Text                  = source.Name,
                    VerticalOptions       = LayoutOptions.FillAndExpand,
                    VerticalTextAlignment = TextAlignment.Center,
                    FontSize              = 18,
                    TextColor             = Color.Black
                };

                var view_Button = new StackLayout
                {
                    HorizontalOptions = LayoutOptions.EndAndExpand,
                    Padding           = new Thickness(0, 10, 0, 10)
                };

                var delete = Structure_Button.Custom_Button("Удалить");
                delete.Clicked += Delete_Anime;

                view_Button.Children.Add(delete);

                view.Children.Add(label);
                view.Children.Add(view_Button);
            }
        }
Ejemplo n.º 3
0
        public Page_Command_Add()
        {
            var view = new StackLayout();

            view.Padding = new Thickness(5, 20, 5, 20);
            view.Spacing = 10;

            entry = new Entry
            {
                TextColor         = Color.Black,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                FontSize          = 14
            };

            var add_S = Structure_Button.Custom_Button("Добавить");

            add_S.Clicked += Add_S;

            view.Children.Add(entry);
            view.Children.Add(add_S);

            Content = view;
        }