public override void Start() { base.Start(); IStack stack = Platform.Current.Create <IStack>(); ILabel lblPasword = Platform.Current.Create <ILabel>(); lblPasword.VerticalAlignment = VerticalAlignment.Bottom; lblPasword.Text = "Enter your password"; lblPasword.Height = 30; stack.Children.Add(lblPasword); IPasswordTextBox txtBox = Platform.Current.Create <IPasswordTextBox>(); txtBox.Name = "Password"; txtBox.BackgroundColor = new Color(1, 230, 200, 135); txtBox.BorderColor = new Color(1, 229, 238, 125); txtBox.Width = 100; txtBox.BorderWidth = new Thickness(5); txtBox.VerticalAlignment = VerticalAlignment.Center; stack.Children.Add(txtBox); IButton cmdClose = Platform.Current.Create <IButton>(); cmdClose.Text = "Close"; cmdClose.Click += CmdClose_Click; stack.Children.Add(cmdClose); Platform.Current.Page.Title = "Test Autocomplete"; Platform.Current.Page.Content = stack; }
/// <summary> /// Start this instance. /// <para xml:lang="es"> /// Inicia una instancia de este objeto. /// </para> /// </summary> public override void Start() { base.Start(); // Create an Stack. IStack stack = Platform.Current.Create <IStack>(); // Create an Label with text and size specific and adds it to the Stack. lblPasword = Platform.Current.Create <ILabel>(); lblPasword.VerticalAlignment = VerticalAlignment.Bottom; lblPasword.Text = "Enter your password"; lblPasword.Height = 30; stack.Children.Add(lblPasword); // Create an PaswordTextBox with backgroundcolor, width and bordercolor specific, aligned center and adds it to the Stack. IPasswordTextBox txtBox = Platform.Current.Create <IPasswordTextBox>(); txtBox.Name = "Password"; txtBox.BackgroundColor = new Color(1, 230, 200, 135); txtBox.BorderColor = new Color(1, 229, 238, 125); txtBox.Width = 100; txtBox.BorderWidth = new Thickness(5); txtBox.VerticalAlignment = VerticalAlignment.Center; txtBox.ValueChanged += TxtBox_ValueChanged; stack.Children.Add(txtBox); // Creates the Button cmdClose with text specific, with the event also click and adds it to the stack. IButton cmdClose = Platform.Current.Create <IButton>(); cmdClose.Text = "Close"; cmdClose.Click += CmdClose_Click; stack.Children.Add(cmdClose); // Establishes the content and title of the page. Platform.Current.Page.Title = "Test Autocomplete"; Platform.Current.Page.Content = stack; }
public override void Start() { base.Start(); //IGrid grid = CurrentPage.Create<IGrid>(); IGrid grid = Platform.Current.Create <IGrid>(); grid.ColumnCount = 2; grid.RowCount = 3; lblUserName = Platform.Current.Create <ILabel>(); lblUserName.Text = "Username"; grid.SetContent(0, 0, lblUserName); txtUserName = Platform.Current.Create <ITextBox>(); grid.SetContent(0, 1, txtUserName); lblPassword = Platform.Current.Create <ILabel>(); lblPassword.Text = "Password"; grid.SetContent(1, 0, lblPassword); txtPassword = Platform.Current.Create <IPasswordTextBox>(); grid.SetContent(1, 1, txtPassword); cmdLogin = Platform.Current.Create <IButton>(); cmdLogin.Text = "Login"; cmdLogin.Click += cmdLogin_Click; grid.SetContent(2, 0, cmdLogin); lblMessage = Platform.Current.Create <ILabel>(); lblMessage.Text = "Wrong data"; lblMessage.Visible = false; grid.SetContent(2, 1, lblMessage); Platform.Current.Page.Title = "Please login"; Platform.Current.Page.Content = grid; }
public override void Start() { base.Start(); //IGrid grid = CurrentPage.Create<IGrid>(); IGrid grid = Platform.Current.Create<IGrid>(); grid.ColumnCount = 2; grid.RowCount = 3; lblUserName = Platform.Current.Create<ILabel>(); lblUserName.Text = "Username"; grid.SetContent(0, 0, lblUserName); txtUserName = Platform.Current.Create<ITextBox>(); grid.SetContent(0, 1, txtUserName); lblPassword = Platform.Current.Create<ILabel>(); lblPassword.Text = "Password"; grid.SetContent(1, 0, lblPassword); txtPassword = Platform.Current.Create<IPasswordTextBox>(); grid.SetContent(1, 1, txtPassword); cmdLogin = Platform.Current.Create<IButton>(); cmdLogin.Text = "Login"; cmdLogin.Click += cmdLogin_Click; grid.SetContent(2, 0, cmdLogin); lblMessage = Platform.Current.Create<ILabel>(); lblMessage.Text = "Wrong data"; lblMessage.Visible = false; grid.SetContent(2, 1, lblMessage); Platform.Current.Page.Title = "Please login"; Platform.Current.Page.Content = grid; }