C# MVVM:从头到尾的教程?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1405739/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 16:10:04  来源:igfitidea点击:

MVVM: Tutorial from start to finish?

c#.netwpfmvvm

提问by JP Richardson

I'm a C#/Windows Forms programmer with more than 5 years experience. I've been investigating WPF using the MVVM (Model-View-ViewModel) design pattern. I have searched the Internet for tutorials. I have even watched the entirety of Jason Dolinger's awesome video. Although I have found many, I have not found one that takes me from start to finish. What I really want is a tutorial that doesn't assume any previous WPF knowledge.

我是一名 C#/Windows 窗体程序员,拥有超过 5 年的经验。我一直在使用 MVVM(模型-视图-视图模型)设计模式研究 WPF。我已经在互联网上搜索了教程。我什至完整地观看了 Jason Dolinger 的精彩视频。虽然我找到了很多,但我还没有找到一个让我从头到尾的。我真正想要的是一个不假设任何以前的 WPF 知识的教程。

What are your favorite WPF-MVVM tutorials that helped you to learn?

你最喜欢的 WPF-MVVM 教程有哪些帮助你学习?

采纳答案by Metro Smurf

Your question really seems to be asking 2 questions:

你的问题似乎真的在问两个问题:

  1. Where are some good tutorials on WPF, assuming I have no previous WPF experience?
  2. Where are some good tutorials on learning MVVM?
  1. 假设我以前没有 WPF 经验,哪里有一些关于 WPF 的好教程?
  2. 哪里有学习 MVVM 的好教程?

Some of these resources may be duplicated in previous answers...

其中一些资源可能在以前的答案中重复...

Tutorials on WPF

WPF 教程

MVVM Tutorials

MVVM 教程

Composite WPF (Prism) Resources
Though not exactly what you asked, it is the natural progression with WPF and MVVM.

复合 WPF (Prism) 资源
虽然不是您所要求的,但它是 WPF 和 MVVM 的自然发展。

回答by Simon P Stevens

This isn't a tutorial, but it's the diagram on thispage that helped me get my head around mvvm.

这不是一个教程,但它是在图这个页面,帮助我让我的头围绕MVVM。

回答by Muad'Dib

Some blogs/websites to check out:

一些要查看的博客/网站:

Currently, Josh Smith has a "From Russia With Love" article that can be of some use to you.

目前,Josh Smith 有一篇“来自俄罗斯的爱”文章,可能对您有所帮助。

回答by bitbonk

A while ago I was in a similar situation (allthough I had a little WPF knowledge already), so I started a community wiki. There are a lot of great ressources there:

前段时间我也遇到过类似的情况(虽然我已经有了一点 WPF 知识),所以我开始了一个社区维基。那里有很多很棒的资源:

What applications could I study to understand (Data)Model-View-ViewModel?

我可以学习哪些应用程序来理解(数据)模型-视图-视图模型?

回答by Max Galkin

I was in exactly the same situation recently, mate, and I can tell you what I did.

我最近处于完全相同的情况,伙计,我可以告诉你我做了什么。

Josh Smith "WPF Apps With The Model-View-ViewModel Design Pattern"read again, again and again :-) download the code, examine, compile and keep it around

Josh Smith “WPF Apps With The Model-View-ViewModel Design Pattern”一遍又一遍地阅读:-) 下载代码,检查,编译并保留它

MVVM foundation

MVVM基础

  1. Examine the framework, use it in your app.
  2. Look at the Demo application in that framework.
  1. 检查框架,在您的应用程序中使用它。
  2. 查看该框架中的 Demo 应用程序。

No real start-to-finish tutorials, sorry...

没有真正的从头到尾的教程,抱歉...

回答by Max Galkin

My blog has a complete series of tutorial starting from scratch for WPF MVVM and WPF Prism. Have a look here: http://blog.raffaeu.com/archive/2009/06/03/wpf-and-vmmv-tutorial-01-introduction.aspx

我的博客有一个完整的系列教程,从头开始,用于 WPF MVVM 和 WPF Prism。看看这里:http: //blog.raffaeu.com/archive/2009/06/03/wpf-and-vmmv-tutorial-01-introduction.aspx

回答by Abdulsattar Mohammed

I read Josh Smith's article and found it very difficult. Once understood, I wrote a very simple one that should get you really started on it. Get it here.

我阅读了 Josh Smith 的文章,发现很难。一旦理解,我写了一个非常简单的,应该让你真正开始。从这里获取。

回答by JP Richardson

I really liked these articles:

我真的很喜欢这些文章:

  1. MVVM for Tarded Folks Like Me
  2. How Tards Like Me Make MVVM Apps
  1. MVVM 适用于像我这样迟到的人
  2. 像我这样的 Tards 如何制作 MVVM 应用程序

He really dumbs down the concept in a humorous way. Worth reading.

他真的以幽默的方式使这个概念变得愚蠢。值得一读。

回答by Cocoa Dev

回答by Chris S

There's a very good Techdays 2010 video introduction to the MVVM pattern, clearly explained:

Techdays 2010 有一个非常好的 MVVM 模式介绍视频,解释清楚: