开发者

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:

The image becomes larger when it is added to a WPF page?

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?)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜