private async void LoadItemsInListView(string searchString = "") { bool fromSearch = !string.IsNullOrEmpty(searchString); ShowPB(true); if (fromSearch) { var newList = await HostelManager.GetHostelList(searchString); //listHostel.DataContext = null; listHostel.DataContext = newList; listHostel.FooterTemplate = null; btnReset.Visibility = Windows.UI.Xaml.Visibility.Visible; } else { var newList = await HostelManager.GetNextHostelItems(); //listHostel.DataContext = null; listHostel.DataContext = newList; listHostel.FooterTemplate = footerTemplate; } ShowPB(false); }
private async void InitListView() { listHostel.DataContext = await HostelManager.GetNextHostelItems(); }