ImageViewer now has a typed ImageAlignment property, so the original use case can be written as:
MyImageViewer.Stretch = ImageStretch.Uniform
MyImageViewer.ImageAlignment = ImageAlignment.Top
The image keeps its aspect ratio and is positioned at the top of the control, leaving any unused space below it.
All nine positions are supported: TopLeft, Top, TopRight, Left, Centre, Right, BottomLeft, Bottom, and BottomRight. The default remains Centre, preserving existing behaviour.
The property is also available in Studio’s visual designer, and the next release will include an ImageViewer Alignment example demonstrating each option: https://feedback.objo.dev/feature/1304