I think TI82 is right on this issue. The image become bigger than you expect because its dpi doesn't match the dpi of your system setting.

A simply workaround is to bind the size of the Image to the PixelWidth and PixelHeight properties of the BitmapSource and set the Stretch behavior to Fill. These two properties are calculated against the pixels of the image and the dpi of the system settting. So the Image will be of the exact size you want.

Here is an example:

Image Stretch="Fill" Width="{Binding RelativeSource={RelativeSource Self}, Path=Source.PixelWidth}" Height="{Binding RelativeSource={RelativeSource Self}, Path=Source.PixelHeight}"/>

最新文章

  1. C#设计模式系列:享元模式(Flyweight)
  2. listView当中有嵌套了有onClickListener的控件时ListView自身的onItemClick无响应的解决方案
  3. 每天一个linux命令(12):more命令
  4. Android--启动系统的剪切图像功能并返回结果
  5. Java编程规范实践
  6. Linux 命令 - crontab: 任务调度
  7. Android SimpleAdapter源码详解
  8. android打包签名介绍
  9. information_schema.optimizer_trace学习
  10. Saiku图表导出时中文显示问题的解决方法
  11. 7.Swift翻译教程系列——控制循环的流程
  12. mysql数据库开启慢查询日志
  13. CF 690C3. Brain Network (hard) from Helvetic Coding Contest 2016 online mirror (teams, unrated)
  14. 处理eclipse启动时报java.lang.IllegalStateException
  15. nginx配置ssl验证
  16. [转帖]BRD、MRD 和 PRD
  17. springmvc转springboot过程中访问jsp报Whitelabel Error Page错误
  18. Filezilla 绿色版 禁止升级 能用。
  19. 升级Ubuntu
  20. keepalived之 ipvsadm-1.26-4(lvs)+ keepalived-1.2.24 安装

热门文章

  1. c++中冒号(:)和双冒号(::)的用法
  2. SQL基本概念
  3. Caffe使用: Ubuntu 14.04(x64) 从cuda 7.0 升级到 cuda8.0
  4. SQL 中LTrim、RTrim与Trim的用法
  5. luogu1312
  6. MT【77】函数的定义理解
  7. NOIP2018 No regrets youth
  8. 【转】C/C++位域结构深入解析
  9. 四、spring boot 1.5.4 日志管理
  10. QWidget窗体中使用Q_OBJECT后无法添加背景图片或背景色