What is WPF and how does it compare to WinForms?

前端 未结 7 1965
星月不相逢
星月不相逢 2021-01-30 05:02

I\'ve been looking at WPF, but I\'ve never really worked in it (except for 15 minutes, which prompted this question). I looked at this post but its really about the \"Flash\" of

7条回答
  •  攒了一身酷
    2021-01-30 05:37

    From an implementation perspective, one of the main differences is that WPF uses a strictly enforced model-view-viewmodel M-V-VM architecture, with the view being defined in a custom markup language, XAML, the viewmodel being a class with accessible properties, and the model effectively being the data access layer. WinForms, by comparison, has no such explicit separation - although by convention the different aspects may be grouped in different C# files, its all still code. In practice this makes WPF development more like web DOM development, with the WPF framework running in the background and mediating.

提交回复
热议问题