Implement KeyPress event in WPF Application

Last Reply one month ago By pandeyism

Posted one month ago

Hi!

When I used this code in WinForm C# after pres Enter coursor move to txtPas.Text.

How I can use it in WPF textbox? 

private void txtLog_KeyPress(object sender, KeyPressEventArgs e)
{
    if (e.KeyChar == 13)
        txtPas.Focus();
}