Exemplo n.º 1
0
        public XButtonCurrency AddButton(Grid grid, decimal value, int row, int column, int columnSpan = 1, Action onClicked = null)
        {
            var element = new XButtonCurrency
            {
                Value           = value,
                HeightRequest   = 30,
                VerticalOptions = LayoutOptions.Center,
                WidthRequest    = 100,
            };

            if (onClicked != null)
            {
                element.Clicked += (sender, e) =>
                {
                    onClicked();
                };
            }

            this.AddElement(grid, element, row, column, columnSpan);
            return(element);
        }
Exemplo n.º 2
0
        public XButtonCurrency AddButton(StackLayout stack, decimal value, Action onClicked = null)
        {
            var element = new XButtonCurrency
            {
                Value           = value,
                HeightRequest   = 30,
                VerticalOptions = LayoutOptions.Center,
                WidthRequest    = 100,
                FontSize        = 12,
            };

            if (onClicked != null)
            {
                element.Clicked += (sender, e) =>
                {
                    onClicked();
                };
            }
            stack.Children.Add(element);
            return(element);
        }