独立于分辨率或独立监视大小的WPF应用程序(Resolution independent or monitor size independent WPF apps)

编程入门 行业动态 更新时间:2024-10-26 01:30:42
独立于分辨率或独立监视大小的WPF应用程序(Resolution independent or monitor size independent WPF apps)

我怎么能独立开发分辨率和监测大小独立的WPF应用程序。 监视器大小无关的手段在这里假设我在15英寸显示器中开发wpf应用程序,当我在17英寸显示器中查看该应用程序时,通常UI看起来不同,因此我如何摆脱WPF中的此问题。 请详细指导。 谢谢

how could i develop resolution independent and monitor size independent wpf apps. monitor size independent means here suppose i develop a wpf apps in 15inch monitor and when i will view that apps in 17 inch monitor then often UI looks different so how could i get rid of this problem in WPF. please guide in detail. thanks

最满意答案

你正在寻找的是WPF中的Liquid Layout 。

避免为元素指定明确的宽度高度 ,并且应该扩展到任何可用的屏幕分辨率。

当然, MinWidthMaxWidth和MinHeight, MaxHeight在限制尺寸方面也很有用。

参考:

WPF中的自动布局 讨论MSDN论坛上有很多指针的同一主题 WPF真的是独立的吗?

What you are looking for is Liquid Layout in WPF.

Avoid specifying explicit Width and Height for your elements and it should scale up to whatever screen resolution available.

Of course, MinWidth, MaxWidth and MinHeight, MaxHeight are also useful in restricting the size.

Reference:

Automatic Layout in WPF Discussion on MSDN forums on same topic with lots of pointers Is WPF Really Resolution Independent?

更多推荐

本文发布于:2023-07-05 06:52:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1034347.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:独立   应用程序   分辨率   大小   WPF

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!