For quite a few weeks I've been trying to learn WPF and how to handle a large number of images inside a listbox. I've found several articles on stackoverflow regarding this, but the problem is that the code-answers either are incomplete, not working or too complex for me to understand just yet. I hope somebody here can give me an idea on how this is done.
My main goal is to make a layout like this, being able to select individual images in the view (loading images from a folder):
As far as I've understood I should use a listbox in WPF to hold the images, but I'm a bit confused regarding the actual loading of images. Does anyone have a sample that shows how this is done the proper way without blocking the main thread? I've read about ObservableCollection, Backgroundworker, Lists, virtualizingStackPanel and so on, but I have a hard time to understand what I'm supposed to use.
Edit: I've been looking at the following thread, but as the images shows, I have problems that it does not load all images for some reason. That being said, still not sure if that's the way to do it. It loads the first few images quickly, then one each second: WPF UI multitasking