Esempio n. 1
0
        public override void OnValueChange(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            var passwordBox = sender as PasswordBox;

            if (passwordBox == null)
            {
                return;
            }
            passwordBox.PasswordChanged -= PasswordBox_PasswordChanged;
            if ((bool)e.NewValue)
            {
                HadTextProperty.SetValue(passwordBox);

                passwordBox.PasswordChanged += PasswordBox_PasswordChanged;
            }
        }
Esempio n. 2
0
 private void PasswordBox_PasswordChanged(object sender, RoutedEventArgs e)
 {
     HadTextProperty.SetValue((PasswordBox)sender);
 }