private void InputUloha22CisloKatDel_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { try { var cisloKata = int.Parse(InputUloha22CisloKatDel.Text); Uloha22List.ItemsSource = AfrikaKataster.Uloha22Info(cisloKata); } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } } }