The image becomes larger when it is added to a WPF page?
I've got an image with 400 * 400 pixels. Now, when I add it to the WPF page:
<Image Source="Resources\about.png" Stretch="None"/>
its size become larger:
Any开发者_如何转开发 idea why this behavior happens?
Specify the width and height explicitly:
<Image Source="Resources\about.png" Width="400" Height="400" />
(Also, in your screenshot, it looks like HorizontalAlignment
and VerticalAlignment
are set to Stretch
?)
精彩评论