private static void OnNumericUpDownValueChaged(object sender, RoutedEventArgs e) { TextBoxHelper.SetTextLength <NumericUpDown>(sender as NumericUpDown, (NumericUpDown numericUpDown) => { if (!numericUpDown.Value.HasValue) { return(0); } return(1); }); }
private static void TextChanged(object sender, RoutedEventArgs e) { TextBoxHelper.SetTextLength <TextBox>(sender as TextBox, (TextBox textBox) => textBox.Text.Length); }
private static void PasswordChanged(object sender, RoutedEventArgs e) { TextBoxHelper.SetTextLength <PasswordBox>(sender as PasswordBox, (PasswordBox passwordBox) => passwordBox.Password.Length); }