Recently I found myself in a position whereby I had to create a WPF UserControl of an image viewer. The design for the control looked as if you had taken a stack of images and dropped them down onto a surface. That is, they were not perfectly lined up; some were rotated slightly, some were moved a little to the top, left, bottom or right.
So, I thought about it and decided it would be a good idea to put all of the images into a ListBox Control; however, there was one slight problem: a ListBox Control uses a VirtualizingStackPanel (VSP) to show it content (also known as Children) and a VSP arranges its Children just like a StackPanel; that is, it lines them up one after the other either vertically or horizontally.
Read More