Handler object type for the AutoTabOnMaxLength property.
        /// <summary>
        /// Handles changes to the AutoTabOnMaxLength property.
        /// </summary>
        /// <param name="d">
        /// The <see cref="DependencyObject"/> on which
        /// the property has changed value.
        /// </param>
        /// <param name="e">
        /// Event data that is issued by any event that
        /// tracks changes to the effective value of this property.
        /// </param>
        private static void OnAutoTabOnMaxLengthChanged(
            DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            bool newAutoTabOnMaxLength = (bool)d.GetValue(AutoTabOnMaxLengthProperty);
            var  handler = GetPasswordAutoTabOnMaxLengthHandler(d);

            if (handler != null)
            {
                handler.Detach();
                SetPasswordAutoTabOnMaxLengthHandler(d, null);
            }

            if (newAutoTabOnMaxLength)
            {
                handler = new PasswordAutoTabOnMaxLengthHandler((PasswordBox)d);
                SetPasswordAutoTabOnMaxLengthHandler(d, handler);
            }
        }
        /// <summary>
        /// Handles changes to the AutoTabOnMaxLength property.
        /// </summary>
        /// <param name="d">
        /// The <see cref="DependencyObject"/> on which
        /// the property has changed value.
        /// </param>
        /// <param name="e">
        /// Event data that is issued by any event that
        /// tracks changes to the effective value of this property.
        /// </param>
        private static void OnAutoTabOnMaxLengthChanged(
            DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            bool newAutoTabOnMaxLength = (bool)d.GetValue(AutoTabOnMaxLengthProperty);
            var handler = GetPasswordAutoTabOnMaxLengthHandler(d);

            if (handler != null)
            {
                handler.Detach();
                SetPasswordAutoTabOnMaxLengthHandler(d, null);
            }

            if (newAutoTabOnMaxLength)
            {
                handler = new PasswordAutoTabOnMaxLengthHandler((PasswordBox)d);
                SetPasswordAutoTabOnMaxLengthHandler(d, handler);
            }
        }
 public static void SetPasswordAutoTabOnMaxLengthHandler(DependencyObject d, PasswordAutoTabOnMaxLengthHandler value)
 {
     d.SetValue(PasswordAutoTabOnMaxLengthHandlerProperty, value);
 }
 public static void SetPasswordAutoTabOnMaxLengthHandler(DependencyObject d, PasswordAutoTabOnMaxLengthHandler value)
 {
     d.SetValue(PasswordAutoTabOnMaxLengthHandlerProperty, value);
 }