I want to execute the code behind my Search Button by pressing Enter. I have the Accept Button property to my search button. However, when i place my button as NOT vi
In WPF apps This code working perfectly
WPF
private void txt1_KeyDown(object sender, KeyEventArgs e) { if (Keyboard.IsKeyDown(Key.Enter) ) { Button_Click(this, new RoutedEventArgs()); } }