开发者

MVVM in Visual Studio 2010?

I am trying to use this pattern MVVM pattern with the tutorial: http://www.codeproject.com/KB/WPF/MVV开发者_如何学JAVAMQuickTutorial.aspx It seems it might work for Visual Studio 2008 but what about Visual Studio 2010? I am trying to install the template "WPF Model-View Application" but according to some reviewers at the Codepeax project of "WPF Model-View-ViewModel Toolkit", this project appears to be dumped by Microsoft or buggy? Sorry but I am confused. I cannot get straight answers on what the best practices for developing a WPF application according to Microsoft. Is the MVVM pattern no go good for an updated Visual Studio 2010 environment using C#?

What is the best and modern pattern to use for WPF in Visual Studio 2010 using C#? Can someone send out a decent easy end to end tutorial on this? I like to download sample code and project solutions as well. Thanks a billion


MVVM is a pattern, that is it's language agnostic. You can apply it in java, c++, vb etc.
The tutorial/demo may not work in c# 4, but the principles would be the same.

Are you having problems understanding a specific point?


There is an excellent toolkit called MVVM Light that works perfectly in Visual Studio 2010.

There is a bunch of information about it available here: http://www.galasoft.ch/mvvm/

This tutorial will probably be especially helpful: http://www.galasoft.ch/mvvm/creating/

There is also a great series from Jesse Liberty here: http://jesseliberty.com/2011/01/04/wpfs-mvvm-light-toolkit-soup-to-nuts-part-i/


I am using this and it works great in visual studio 2010.


You want to try out http://mvvmpsample.codeplex.com its a VS2010 solution

Following blog posts explain what it is:

  • http://www.overroot.com/blog/?p=188
  • http://www.overroot.com/blog/?p=285


I found this template very useful. It has some useful predefined class such as NotificationObject that handles calls to RaisePropertyChanged by passing the field itself instead of a string (very useful) as well as DelegateCommand and some Converters. It has some example XAML code to show how things are wired up as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜