private void UserControl_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter || e.Key == Key.Space) { OnItemSelected(); } }