I'm displaying a variable number of images in a WPF window.
The images have varying widths and heights, but I'm setting the MaxWidth and MaxHeight for each.
I'm currently using a Wrap Panel, but I'm having trouble achieving what I want.
I don't want scrollbars and I want to load only as many images as will fit in the panel without getting cropped.
I've tried to do the math myself, but the images' ActualHeight and ActualWidth are both showing as 0 after I load them.
Any ideas?