Resolution independent or monitor size independent WPF apps

Thomas picture Thomas · Feb 4, 2011 · Viewed 11.8k times · Source

How could I develop resolution-independent and monitor size independent WPF apps? Monitor size independent means here suppose I develop a WPF app on a 15-inch monitor and when I will view that app on a 17-inch monitor then often UI looks different so how could I get rid of this problem in WPF? Please guide in detail. Thanks.

Answer

decyclone picture decyclone · Feb 4, 2011

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: