我怎么能独立开发分辨率和监测大小独立的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 。
避免为元素指定明确的宽度和高度 ,并且应该扩展到任何可用的屏幕分辨率。
当然, MinWidth , MaxWidth和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?更多推荐
发布评论