Resolution independent or monitor size independent WPF apps

后端 未结 3 952
予麋鹿
予麋鹿 2020-12-18 08:49

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

3条回答
  •  失恋的感觉
    2020-12-18 09:19

    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?

提交回复
热议问题