private void SelectCountry(object sender, SelectionChangedEventArgs e) { routesList.Items.Clear(); dynamic listBoxItem = sender; int countryId = listBoxItem.SelectedValue.Id; var routes = routeService.GetByCountryName(countryId); foreach (var item in routes) { routesList.Items.Add(new RouteVM(item)); } routesList.DisplayMemberPath = "DisplayValue"; }