protected override void OnTextChanged( TextChangedEventArgs e )
{
base.OnTextChanged( e );
if( !this.AutoMoveFocus )
return;
if( ( this.Text.Length != 0 )
&& ( this.Text.Length == this.MaxLength )
&& ( this.CaretIndex == this.MaxLength ) )
{
if( this.CanMoveFocus( FocusNavigationDirection.Right, true ) == true )
{
FocusNavigationDirection direction = ( this.FlowDirection == FlowDirection.LeftToRight )
? FocusNavigationDirection.Right
: FocusNavigationDirection.Left;
this.MoveFocus( new TraversalRequest( direction ) );
}
}
}