This is a simple question but I can’t seem to get it formulated right.
How are WPF and WinForms “positioned” in the .NET framework?
With this I mean, WPF is a subsystem of the .NET framework and WinForms a graphical API but can anyone explain to me how exactly those are different? I know the meaning and use of an API but WPF being subsystem confuses me a bit. Is there a visual aid that clarifies this.
I also understand that WinForms and WPF are both ways to create graphical applications.
I hope I’m making sense…
I get my info from:
http://en.wikipedia.org/wiki/Windows_Presentation_Foundation
I’m not sure where you got this “WPF is a subsystem of the .NET framework” from, but at first i would say no. Both, WPF and Windows Forms are a framework to build graphical applications with managed languages. While winforms is more or less a wrapper on the winapi, enhanced with .net features like events; WPF is only a wrapper for the win api until reaching the window, from that point on everything is done using accelerated hardware, which allows a lot more flexibility, like using vector graphics, builtin support for animations. The way to use both these apis is also completely different, in WPF for example XAML is used (not necessary but alot nicer) to express how the ui should look, how controls are composed etc. Also in WPF the design of a control is not fixed and can completely be changed. This is done by nicely dividing logic from look.
Now, i could understand the subsystem of .net part when only looking at some of the fundamental tools WPF brings to the table, like dependency properties, but again i don’t think you would use WPF that much without using it also as an api for creating graphical applications. That said it is of course possible to mix both Windows Forms a WPF with each other.
tl:dr: both are apis for creating rich graphical application but with completely different design philosophies and different approaches to reach the goal.