public async Task<bool> BindToUserTimeline(UserAccountEntity userAccountEntity) { progressBar.Visibility = Visibility.Visible; searchUserCollection = new InfiniteScrollingUserCollection(); searchUserCollection.timeline = "Following"; //searchUserCollection.userId = App.ViewModel.SelectedUser.UserID; searchUserCollection.Offset = 0; searchUserCollection.userAccountEntity = userAccountEntity; searchUserCollection.UserCollection = new ObservableCollection<UserEntity>(); List<UserEntity> items = await SearchManager.SearchUserList(SearchUserBox.Text, null, null, false, userAccountEntity); foreach (UserEntity item in items) { searchUserCollection.UserCollection.Add(item); } searchUserCollection.Offset = 1; userList.DataContext = searchUserCollection; //userList.ItemRealized += followingTimeline_ItemRealized; progressBar.Visibility = Visibility.Collapsed; return true; }
public async Task<bool> BindToUserFollowingGallery(UserAccountEntity userAccountEntity) { UserFollowingCollection = new InfiniteScrollingUserCollection { timeline = "Following", userId = _selectedUser.UserID, Offset = -1, userAccountEntity = userAccountEntity, UserCollection = new ObservableCollection<UserEntity>() }; List<UserEntity> items = await UserManager.LookupFollowingUsers(0, _selectedUser.UserID, userAccountEntity); foreach (UserEntity item in items) { UserFollowingCollection.UserCollection.Add(item); } UserFollowingCollection.Offset = 0; followingList.DataContext = UserFollowingCollection; followingList.ItemRealized += followingTimeline_ItemRealized; return true; }