Reputation: 42175
I have an image in a WPF window. When I resize the window the image resizes with it. Is it possible to preserve the aspect ratio when the image is resizing, so it doesn't look squashed if the window is too narrow? If so, how?
Upvotes: 18
Views: 17475
Reputation: 44038
Set the Image.Stretch
Property to Uniform
<Image Stretch="Uniform" ....etc />
Upvotes: 32