private void SetElements() { _loginButton = new CustomButton { Text = "Entrar" }; _registerButton = new CustomButton { Text = "Registrarse" }; _emailText = new CustomEntry { Name = "emailText", Placeholder = "Email", Keyboard = Keyboard.Email }; _passText = new CustomEntry { Name = "passText", Placeholder = "Contraseña", IsPassword = true }; // The root page of your application ContentPage = new ContentPage { Content = new StackLayout { Orientation = StackOrientation.Vertical, Spacing = 15, BackgroundColor = Color.FromRgba(0,0,0,230), Padding = new Thickness(20, 0, 20, 20), VerticalOptions = LayoutOptions.StartAndExpand, Children = { _emailText, _passText, _loginButton, _registerButton } } }; ContentPage.BackgroundImage = "gruaBack.jpg"; }
private void SetElements() { this.Title = "Registrarse"; _registerButton = new CustomButton { Text = "Registrarse" }; _emailText = new CustomEntry { Name = "emailText", Placeholder = "Email", Keyboard = Keyboard.Email }; _passText = new CustomEntry { Name = "passText", Placeholder = "Contraseña", IsPassword = true }; _nameText = new CustomEntry { Name = "nameText", Placeholder = "Nombre" }; _lastNameText = new CustomEntry { Name = "lastNameText", Placeholder = "Apellidos" }; _emailLabel = new Label { Text = "Email:" }; _passLabel = new Label { Text = "Contraseña:" }; _nameLabel = new Label { Text = "Nombre:" }; _lastNameLabel = new Label { Text = "Apellidos:" }; _rolesDropDown = new Picker { Title = "Rol", VerticalOptions = LayoutOptions.CenterAndExpand }; foreach (string roleName in roles.Keys) { _rolesDropDown.Items.Add (roleName); } Content = new StackLayout { Orientation = StackOrientation.Vertical, Spacing = 15, BackgroundColor = Color.FromRgba(0,0,0,230), Padding = new Thickness (20, 0, 20, 20), VerticalOptions = LayoutOptions.StartAndExpand, Children = { _emailText, _passText, _nameText, _lastNameText, _rolesDropDown, _registerButton } }; this.BackgroundImage = "gruaBack.jpg"; }