What is the difference between WPF and WinForms?

前端 未结 7 991
春和景丽
春和景丽 2021-01-30 21:30

I am programming simple Windows apps. I don\'t need DB support. Why would I use WPF instead of WinForms?

7条回答
  •  心在旅途
    2021-01-30 21:45

    WPF can utilize hardware acceleration to some degree, but that is expected to improve over time.

    Also, because of XAML, you have more options for "doing stuff", declarative vs. programmatic, or a mixture of both.

    Microsoft no longer does active development on WinForms, they are strongly pushing WPF, and for good reason.

    WPF allows for much easier "resolution agnostic" designing. To achieve that in WinForms, it is a lot more work.

    The MVVM pattern was already mentioned in one of the comments, this allows one to do real unit testing vs. GUI-based testing on your code, that is a big win, in my experience.

提交回复
热议问题