Ejemplo n.º 1
0
            public NumberInputView()
            {
                BackgroundColor = UIColor.Black.ColorWithAlpha(.5f);
                Add(numberPanel = new StackPanel{
                    Columns = 3,
                    Padding = 5,
                });

                Enumerable.Range(1,9).ForEach(x=> numberPanel.Add(createButton(x.ToString())));
                numberPanel.Add(createButton("."));
                numberPanel.Add(createButton("0"));
                numberPanel.Add(createButton("del"));

                done = new TintedButton {
                    Layer = {
                        CornerRadius = 5
                    },
                    BackgroundColor = UIColor.White,
                    Frame = new RectangleF(0,0,44,44),
                    Title = "Done",
                    Font = UIFont.SystemFontOfSize(30),
                    SelectedTintColor = UIColor.Black,
                    TintColor = TintColor,
                };
                done.TouchUpInside += (object sender, EventArgs e) =>{
                    EndEditing();
                };
                Add(done);
            }