Beispiel #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.

            RaisedButton.SetTitle(title: "Button Raised", forState: UIControlState.Normal);
            RaisedButton.SetTitleColor(color: Color.White, forState: UIControlState.Normal);
            RaisedButton.PulseColor      = Color.White;
            RaisedButton.TitleLabel.Font = RobotoFont.RegularWithSize(24f);
            RaisedButton.BackgroundColor = Color.Blue.Base;
        }
        void prepareResignResponderButton()
        {
            var btn = new RaisedButton("Resign", Color.Blue.Base);

            btn.TouchUpInside += (sender, e) =>
            {
                nameField.ResignFirstResponder();
                emailField.ResignFirstResponder();
                passwordField.ResignFirstResponder();
            };
            View.Layout(btn).Width(100).Height(constant).Top(24).Right(24);
        }
        private void prepareRaisedButtonExample()
        {
            nfloat w      = 200;
            var    button = new RaisedButton(new CGRect((View.Bounds.Width - w) / 2, 200, w, 48));

            button.SetTitle(title: "Button Raised", forState: UIControlState.Normal);
            button.SetTitleColor(color: MaterialColor.Blue.Base, forState: UIControlState.Normal);
            button.PulseColor      = MaterialColor.Blue.Base;
            button.TitleLabel.Font = RobotoFont.RegularWithSize(24f);

            // Add button to UIViewController.
            View.AddSubview(button);
        }
 public Widget buildRaisedButton()
 {
     return(new Align(
                alignment: new Alignment(0.0f, -0.2f),
                child: new Column(
                    mainAxisSize: MainAxisSize.min,
                    children: new List <Widget> {
         new ButtonBar(
             mainAxisSize: MainAxisSize.min,
             children: new List <Widget> {
             new RaisedButton(
                 child: new Text("RAISED BUTTON"),
                 onPressed: () => {
                 // Perform some action
             }
                 ),
             new RaisedButton(
                 child: new Text("DISABLED"),
                 onPressed: null
                 )
         }
             ),
         new ButtonBar(
             mainAxisSize: MainAxisSize.min,
             children: new List <Widget> {
             RaisedButton.icon(
                 icon: new Icon(Icons.add, size: 18.0f),
                 label: new Text("RAISED BUTTON"),
                 onPressed: () => {
                 // Perform some action
             }
                 ),
             RaisedButton.icon(
                 icon: new Icon(Icons.add, size: 18.0f),
                 label: new Text("DISABLED"),
                 onPressed: null
                 )
         }
             )
     }
                    )
                ));
 }