WPF: How to display an image at its original size?

后端 未结 5 1035
伪装坚强ぢ
伪装坚强ぢ 2020-12-02 13:05

I have a problem with displaying images in WPF.

Here\'s my code:

5条回答
  •  盖世英雄少女心
    2020-12-02 13:16

    If you want to display the image with original size, but don't know the image size, I think the best way is to set the image as background of UIElement. Like this:

        
    

提交回复
热议问题