Xceed.Wpf.Toolkit.AutoSelectTextBox.OnTextChanged C# (CSharp) Method

OnTextChanged() protected method

protected OnTextChanged ( System.Windows.Controls.TextChangedEventArgs e ) : void
e System.Windows.Controls.TextChangedEventArgs
return void
    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 ) );
        }
      }
    }