MVC Frameworks for WPF

2019-03-16 06:14发布

问题:

Are there any MVC frameworks available for WPF other than Caliburn (which looks awesome btw)?

回答1:

Both Caliburn and PRISM are very nice. However if you go down the path of MVC you will miss out on the powerful 2 way binding. Consider MVVM, it's a very clean and practical approach for WPF. This is the pattern Microsoft used for their expression blend.



回答2:

There is also Magellan, a port of ASP.NET MVC for WPF.



回答3:

There is Composite WPF aka PRISM from Microsoft Pattern & Practices.

http://www.codeplex.com/CompositeWPF



回答4:

one additional possibility is pureMVC (www.puremvc.org)

  • it seems well-proven, has good short doc/UML, and the project is responsive, and has been ported to .NET - there exists an WPF demo, it will be published soon but you also can contact the project owner about it.

Regards, Paul



回答5:

A new MVC framework that works with practically and .net technology (WebForms, WinForms, WPF, Xamarin Forms) is SimpleMVC by Gateway Programming School. This link gives an overview and example usage.

A short example is to create a controller from SimpleControllerBase that has your business logic. This will depend on the SimpleModelBase implementations you provide. Implementations of ISimpleView are handled through WPF pages and controls. The derived controller only works with the interfaces that extend ISimpleView so that the WPF parts are abstracted away. You then use properties on the view to do two-way data-binding, just like MVVM, but with a proper layered architecture.