示例#1
0
 private void ExtendedLongListSelector_Link_1(object sender, LinkUnlinkEventArgs e)
 {
     if (this.horizontalListBox.ManipulationState == System.Windows.Controls.Primitives.ManipulationState.Idle)
     {
         return;
     }
     this.VM.CatalogItemsVM.LoadMoreIfNeeded(e.ContentPresenter.Content);
 }
示例#2
0
        private void SpeakerList_Unlink(object sender, LinkUnlinkEventArgs e)
        {
            AirPlaySpeakerControl control = e.ContentPresenter.FindVisualChild<AirPlaySpeakerControl>();
            if (control == null)
                return;

            _currentSpeakerControls.Remove(control);
        }
示例#3
0
        public void ItemLinked(object sender, LinkUnlinkEventArgs e)
        {
            var last = Days.Last();

            if (e.ContentPresenter.Content.Equals(last))
            {
                Days.Add(last.AddDays(1));
            }
        }
示例#4
0
        void ExtendedListBox_Link(object sender, LinkUnlinkEventArgs e)
        {
            ITweetable o = e.ContentPresenter.DataContext as ITweetable;

            if (o != null)
            {
                lock (viewportItemsLock)
                    viewportItems[o] = e.ContentPresenter;
            }
        }
示例#5
0
        private void LoadMoreMessages_Link(object sender, LinkUnlinkEventArgs e)
        {
            var message = (Message)e.ContentPresenter.Content;
            var index   = model.Messages.IndexOf(message);

            if (index + 1 == model.Messages.Count)
            {
                LoadMessages();
            }
        }
        private void ExtendedLongListSelector_Link_1(object sender, LinkUnlinkEventArgs e)
        {
            int count = this.VM.Messages.Count;
            ConversationHeader content = e.ContentPresenter.Content as ConversationHeader;

            if (count < 10 || content == null || this.VM.Messages[count - 10] != content)
            {
                return;
            }
            this.VM.LoadMoreMessages(this.previousSearchStringMessages, (Action)(() => {}));
        }
示例#7
0
 private void ExtendedLongListSelector_Link_1(object sender, LinkUnlinkEventArgs e)
 {
     if (!this._subscriptions)
     {
         this.FollowersVM.FollowersVM.LoadMoreIfNeeded(e.ContentPresenter.Content);
     }
     else
     {
         this.FollowersVM.SubscriptionsVM.LoadMoreIfNeeded(e.ContentPresenter.Content);
     }
 }
示例#8
0
        private void itemsControlPhotos_Link_1(object sender, LinkUnlinkEventArgs e)
        {
            int count = this.PhotoAlbumVM.PhotosGenCol.Collection.Count;
            AlbumPhotoHeaderFourInARow content = e.ContentPresenter.Content as AlbumPhotoHeaderFourInARow;

            if (count < 10 || content == null || this.PhotoAlbumVM.PhotosGenCol.Collection[count - 10] != content)
            {
                return;
            }
            this.PhotoAlbumVM.LoadMorePhotos();
        }
示例#9
0
 private void List_OnLinked(object sender, LinkUnlinkEventArgs e)
 {
     if (this.pivot.SelectedIndex == 0)
     {
         this._viewModel.Inbox.LoadMoreIfNeeded(e.ContentPresenter.Content);
     }
     else
     {
         this._viewModel.Outbox.LoadMoreIfNeeded(e.ContentPresenter.Content);
     }
 }
示例#10
0
        private void photosLink(object sender, LinkUnlinkEventArgs e)
        {
            int    count   = (this.VM.Photos).Count;
            object content = e.ContentPresenter.Content;
            int    num     = 10;

            if ((!(content is AlbumHeaderTwoInARow) || count >= num) && (count < num || (this.VM.Photos)[count - num] != content))
            {
                return;
            }
            this.VM.LoadData(false, null);
        }
示例#11
0
        private void ExtendedLongListSelector_Link(object sender, LinkUnlinkEventArgs e)
        {
            int    count       = ((Collection <AlbumPhoto>) this._viewModel.PhotosVM.AlbumPhotos).Count;
            object dataContext = ((FrameworkElement)e.ContentPresenter).DataContext;

            if (count >= 20 && (count < 20 || ((Collection <AlbumPhoto>) this._viewModel.PhotosVM.AlbumPhotos)[count - 20] != dataContext))
            {
                return;
            }
            this._viewModel.PhotosVM.CountToLoad = 100;
            this._viewModel.PhotosVM.LoadData(false, null);
        }
 private void List_OnLinked(object sender, LinkUnlinkEventArgs e)
 {
     if (sender == this.AllList)
     {
         this.ViewModel.All.LoadMoreIfNeeded(e.ContentPresenter.Content);
     }
     if (sender == this.UnsureList)
     {
         this.ViewModel.Unsure.LoadMoreIfNeeded(e.ContentPresenter.Content);
     }
     if (sender != this.FriendsList)
     {
         return;
     }
     this.ViewModel.Friends.LoadMoreIfNeeded(e.ContentPresenter.Content);
 }
示例#13
0
        private void itemsControlAlbums_Link(object sender, LinkUnlinkEventArgs e)
        {
            AlbumHeader content = e.ContentPresenter.Content as AlbumHeader;

            if (content == null)
            {
                return;
            }
            foreach (Group <AlbumHeader> group in (Collection <Group <AlbumHeader> >) this.PhotosMainVM.AlbumsVM.Collection)
            {
                int count = ((Collection <AlbumHeader>)group).Count;
                if (count > 20 && ((Collection <AlbumHeader>)group)[count - 20] == content)
                {
                    this.PhotosMainVM.AlbumsVM.LoadData(false, false, null, false);
                }
            }
        }
        private void MediaItemsList_OnLink(object sender, LinkUnlinkEventArgs e)
        {
            ProfileMediaViewModelFacade viewModel = this.ViewModel;

            if (viewModel == null)
            {
                return;
            }
            IMediaHorizontalItemsViewModel horizontalItemsViewModel = viewModel.MediaHorizontalItemsViewModel;

            if (horizontalItemsViewModel == null)
            {
                return;
            }
            object dataContext = ((FrameworkElement)e.ContentPresenter).DataContext;

            horizontalItemsViewModel.LoadMoreItems(dataContext);
        }
示例#15
0
 private void ExtendedLongListSelector_Link_1(object sender, LinkUnlinkEventArgs e)
 {
     if (this.horizontalListBox.ManipulationState == ManipulationState.Idle)
     {
         return;
     }
     if (this.VM != null)
     {
         this.VM.CatalogItemsVM.LoadMoreIfNeeded(e.ContentPresenter.Content);
     }
     else
     {
         if (this.AlbumsVM == null)
         {
             return;
         }
         this.AlbumsVM.CatalogItemsVM.LoadMoreIfNeeded(e.ContentPresenter.Content);
     }
 }
示例#16
0
 private void list_OnLinked(object sender, LinkUnlinkEventArgs e)
 {
     this.ViewModel.Sections[this.pivot.SelectedIndex].Items.LoadMoreIfNeeded(e.ContentPresenter.Content);
 }
示例#17
0
 private void List_OnLinked(object sender, LinkUnlinkEventArgs e)
 {
     this.ViewModel.Invitations.LoadMoreIfNeeded(e.ContentPresenter.Content);
 }
示例#18
0
 private void ExtendedLongListSelector_Link_1(object sender, LinkUnlinkEventArgs e)
 {
     this.FriendRequestsVM.FriendRequestsVM.LoadMoreIfNeeded(e.ContentPresenter.Content);
 }
示例#19
0
 private void List_OnLinked(object sender, LinkUnlinkEventArgs e)
 {
     this.ViewModel.CurrentSection.Items.LoadMoreIfNeeded(e.ContentPresenter.Content);
 }
 private void ListBoxUsers_OnLink(object sender, LinkUnlinkEventArgs e)
 {
     this._viewModel.SearchVM.LoadMoreIfNeeded(e.ContentPresenter.Content);
 }
示例#21
0
 private void Products_Link_1(object sender, LinkUnlinkEventArgs e)
 {
     this.FavVM.ProductsVM.LoadMoreIfNeeded(e.ContentPresenter.Content);
 }
示例#22
0
 private void ExtendedLongListSelector_Link(object sender, LinkUnlinkEventArgs e)
 {
     this.VM.GamesSectionsVM.LoadMoreIfNeeded(e.ContentPresenter.Content);
 }
示例#23
0
 private void SearchResultsListBox_OnLink(object sender, LinkUnlinkEventArgs e)
 {
     this.ViewModel.LoadMoreIfNeeded(e.ContentPresenter.Content);
 }
示例#24
0
 private void ExtendedLongListSelector_Link_2(object sender, LinkUnlinkEventArgs e)
 {
     this.ViewModel.UploadedVideosVM.LoadMoreIfNeeded(e.ContentPresenter.Content);
 }
示例#25
0
 private void ExtendedLongListSelector_Link_1(object sender, LinkUnlinkEventArgs e)
 {
     this.GroupInvitationsVM.InvitationsVM.LoadMoreIfNeeded((e.ContentPresenter.Content as GroupHeader));
 }
示例#26
0
 private void Albums_Link_1(object sender, LinkUnlinkEventArgs e)
 {
     this.ViewModel.AlbumsVM.LoadMoreIfNeeded(e.ContentPresenter.Content);
 }
示例#27
0
 private void listBoxThemeHeaders_Link_1(object sender, LinkUnlinkEventArgs e)
 {
     this.GroupDiscussionsVM.DiscussionsVM.LoadMoreIfNeeded((e.ContentPresenter.Content as ThemeHeader));
 }
示例#28
0
 private void All_Link(object sender, LinkUnlinkEventArgs e)
 {
     this.LikesVM.All.LoadMoreIfNeeded(e.ContentPresenter.Content);
 }
 private void MediaItemsList_OnLink(object sender, LinkUnlinkEventArgs e)
 {
     this.ViewModel.MediaHorizontalItemsViewModel.LoadMoreItems(e.ContentPresenter.DataContext);
 }
示例#30
0
 private void albumsListBoxLink(object sender, LinkUnlinkEventArgs e)
 {
     this.UserVideosVM.VideosOfOwnerVM.AlbumsVM.LoadMoreIfNeeded(e.ContentPresenter.Content);
 }