Example #1
0
        public TransactionPage()
        {
            Title = "Transaction List";

            var labelStyle = new Style(typeof(Label))
            {
                Setters =
                {
                    new Setter {
                        Property = Label.FontSizeProperty, Value = 12
                    }
                }
            };

            Resources = new ResourceDictionary();
            Resources.Add(labelStyle);

            var formLayout = new AbsoluteLayout();

            formLayout.VerticalOptions   = LayoutOptions.FillAndExpand;
            formLayout.HorizontalOptions = LayoutOptions.FillAndExpand;

            formLayout.Children.Add(GetScrollView());

            fab = GetFloatingButton();
            formLayout.Children.Add(fab);

            this.Content = formLayout;
        }
Example #2
0
        private FloatingActionButtonView GetFloatingButton()
        {
            var btn = new FloatingActionButtonView();

            AbsoluteLayout.SetLayoutBounds(btn, new Rectangle(1, 1, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));
            AbsoluteLayout.SetLayoutFlags(btn, AbsoluteLayoutFlags.PositionProportional);
            btn.ColorNormal  = Color.FromHex("#FF3498db");
            btn.ColorPressed = Color.Black;
            btn.ColorRipple  = Color.FromHex("#FF3498db");
            btn.ImageName    = "ic_add.png";
            btn.SetBinding(FloatingActionButtonView.CommandProperty, new Binding("AddItemCommand"));
            return(btn);
        }
Example #3
0
        protected override void OnAppearing()
        {
            var formLayout = new AbsoluteLayout();

            formLayout.VerticalOptions   = LayoutOptions.FillAndExpand;
            formLayout.HorizontalOptions = LayoutOptions.FillAndExpand;

            formLayout.Children.Add(GetScrollView());

            fab = GetFloatingButton();
            formLayout.Children.Add(fab);

            this.Content = formLayout;

            base.OnAppearing();
            list.ItemAppearing    += List_ItemAppearing;
            list.ItemDisappearing += List_ItemDisappearing;
        }