有没有办法用 .Net 3.5 模拟 WPF 中的 UseLayoutRounding
出于安装原因,我想在我的应用程序中使用 3.5。我唯一缺少的功能是 UseLayoutRounding,它与我的自定义控件配合得非常好。有没有办法在3.5中模拟UseLayoutRounding?
For installation reasons, I'd like to use 3.5 in my application. The only feature that I would be lacking is UseLayoutRounding, which worked very nicely with my custom controls. Is there a way to emulate UseLayoutRounding in 3.5?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果有人仍然需要解决方法,请参阅以下链接,查找 Thomas Levesque 评论:
http://tech.pro/tutorial/1062/wpfs-most-important -属性-uselayoutrounding
但这并不能解决不同系统上的 DPI 问题。
In case someone still need a workaround, here's the link, look for the Thomas Levesque comment:
http://tech.pro/tutorial/1062/wpfs-most-important-property-uselayoutrounding
This would not solve problems with DPI on different systems though.
根据您的具体要求,
SnapsToDevicePixels="true"
可能就足够了。Depending on your exact requirements,
SnapsToDevicePixels="true"
may be sufficient.