public SearchResultViewModel(SearchResults results) { this.Items = new ObservableCollection<BusinessViewModel>(); foreach (var b in results.businesses) { this.Items.Add(new BusinessViewModel() { ID = b.id, Name = b.name }); } }
// Constructor public SearchResultsPage(SearchResults results) { InitializeComponent(); // Set the data context of the LongListSelector control to the sample data DataContext = App.ViewModel; // Sample code to localize the ApplicationBar //BuildLocalizedApplicationBar(); }