anybody knows something similar to asp.net mvc for winforms or wpf ?
相关问题
- VNC control for WPF application
- How to dynamically load partial view Via jquery aj
- How do I bind a DataGridViewComboBoxColumn to a pr
- WPF Binding from System.Windows.SystemParameters.P
- Partial Form Class C# - Only display code view for
You could take a look at implementing Model-View-View Model in WPF.
It's not a Framework like .NET MVC, but at its core MVC is a pattern and MVVM is a close analog for WPF.
Well, MVC is a pattern, you can always organize your code in a MVC manner. I'm not quite sure what you are asking for(a framework or something like that... I'm not familiar with any kind of mvc framework for wpf, but this doesn't mean there isn't one), because there is no managing urls in winforms and wpf and the other cool stuff in asp.net-mvc.
If you want to code in WPF way I strongly recommend doing ig the MVVM way.
Here is the ultimate start for wpf mvvm - http://community.infragistics.com/pixel8/media/p/91950.aspx
The most accepted (and in my opinion the most usable) pattern for developing WPF applications is
MVVM
(stands forModel-View-ViewModel
).You can read a quite broad introduction with a walkthrough here: http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
Well the way windows apps are set up actually makes sense, an event driven model can be used in an environment that maintains states. In contrast the amount of javascript hacking to emulate these "states" in webforms is insane. So MVC makes sense in the web because the web is stateless, in windows we have states and should use them. If what you really want is a web interface for your windows service or whatever, you can put a copy of casini in your installer and have them use the web interface without issue. Hope this helps.
For winforms you can implement your own MVP (model view presenter) or MVC (model view controller patterns. There are also some frameworks like CAB (composite application block) that you can use http://msdn.microsoft.com/en-us/library/aa480450.aspx that are basicly a MVC pattern.