private void InputUloha8CisloKatUzem_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { try { var idKatastru = int.Parse(InputUloha8CisloKatUzem.Text); var rodCisloObcan = InputUloha8RodCislo.Text; Uloha8List.ItemsSource = AfrikaKataster.Uloha8(rodCisloObcan, idKatastru); } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } } }