Post view page

Post #38

WPF move next
2012-04-11 02:14:24

I have the following code to move to the next control if the return is entered

private void TextBox_PreviewKeyUp(object sender, KeyEventArgs e)
{
    if (e.Key == Key.Return)
    {
        e.Handled = true;
        ((TextBox)sender).MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
    }
}

 

Test right content

first test

Test right content

second test

Test right content

third test

this is a test