Is the ViewBox the best thing to use to achieve resolution independence in WPF?

前端 未结 2 431

I\'m developing an application that needs to be resolution independent. The application will always be full screen so I have to design my UI so that the monitor resolution w

2条回答
  •  半阙折子戏
    2021-01-02 10:30

    Actually, you're quite right. WPF IS resolution independent, but the problem is how you control font sizing.

    ViewBoxes should be avoided, because they cost performance, but I think a single one shouldn't hurt anybody.

    But beware: It may look right now, but you simply can't display as much information with 640x480 as with 1600x1200... The most elegant solution is to use resolution dependent templates which are demonstratet in the Photo Suru app.

提交回复
热议问题