WPF MVVM Tutorial

Hey all, here is my WPF MVVM knowledge. You should read these articles, whether mine or sites I link to.

However, you may want to skip my stuff and go straight to this nice little training by Karl Shifflett.
In the Box – MVVM Training

  1. A quick overview of MVVM
  2. Binding Visibility to a bool value in WPF
  3. A Hello World template of a WPF application using MVVM
  4. How Do I: Build Data-driven WPF Application using the MVVM pattern
  5. Binding to methods encapsulated in an ICommand
  6. Simplifying the WPF TreeView by Using the ViewModel Pattern
  7. A Progress Bar using WPF’s Progress Bar Control, BackgroundWorker, and MVVM

Visual Studio Helps

  1. A Hello World template of a WPF application using MVVM
  2. A snippet for Properties in a ViewModel

WPF and MVVM Problems

  1. WPF NavigationService blanks PasswordBox.Password, which breaks the MVVM PasswordHelper

A snippet for Properties in a ViewModel

If you are using MVVM you probably should create a snippet very similar to the following to save time.

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\Snippets\1033\Visual C#\propvm.snippet

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
	<CodeSnippet Format="1.0.0">
			<Description>Code snippet for property and backing field for a ViewModel that calls NotifyPropertyChanged.</Description>
			<Author>Jared Barneck</Author>
					<ToolTip>Property type</ToolTip>
					<ToolTip>Property name</ToolTip>
			<Code Language="csharp"><![CDATA[public $type$ $property$
		get { return _$property$;}
			_$property$ = value;
	} private $type$ _$property$;