private void Defocus(TextBox textBox, RoundButton border, string text) { if (textBox.TextLength == 0) { textBox.Text = text; textBox.Font = new Font("Segoe UI Light", 15.75F); textBox.ForeColor = Color.LightGray; border.FlatAppearance.BorderSize = 2; if (text == "Password" || text == "Confirm Password") { textBox.PasswordChar = '\u0000'; } } }
private void Focus(TextBox textBox, RoundButton border, string text) { if (textBox.Text == text) { textBox.Text = string.Empty; textBox.Font = new Font("Segoe UI Semibold", 15.75F); textBox.ForeColor = Color.White; border.FlatAppearance.BorderSize = 4; if (text == "Password" || text == "Confirm Password") { textBox.PasswordChar = '\u25cf'; } } }