/** * Called when the user has stopped scrolling on the gallery's ScrollViewer. This will figure out which * images are in view of the user and load them. */ private void ScrollChangedStopped(object sender, EventArgs e) { // Must stop the timer from repeating infinitely _scrollChangedTimer.Stop(); // Get a list of the current images in view ListBox lb = _scrollViewer.Content as ListBox; List <ImageViewModel> list = DisplayUtils.GetVisibleItemsFromListBox(lb, Application.Current.MainWindow).Cast <ImageViewModel>().ToList(); // Load the images in view, and once this is done, continue loading the rest of the images in the gallery. LoadPriorityImagesThenAll(list); }