26

I am a long time experienced Windows Forms developer, but now it's time to move to WPF because a new WPF project is comming soon to me and I have only a short lead time to prepare myself to learn WPF.

What is the best way for a experienced Winforms devleoper?

Can you give me some hints and recommendations to learn WPF in a very short time!

Are there simple sample WPF solutions and short (video) tutorials? Which books do you recommend? Is www.windowsclient.net a good starting point? Are there alternatives to the official Microsoft site?

BЈовић
  • 13,981
  • 8
  • 61
  • 81
Elmex
  • 753
  • 1
  • 7
  • 10
  • While most of the posts here mention MVVM, I would suggest that you understand the XAML and binding basics first before you get into fancy frameworks. – NoChance Mar 23 '12 at 23:36
  • 3
    I actually just wrote a blog post on the [change in mindset needed when switching from WinForms to WPF](http://rachel53461.wordpress.com/2012/10/12/switching-from-winforms-to-wpfmvvm/). Its very basic and won't contain everything you need to know, but I think it outlines the to change in thought process quite well, and once you understand that, WPF becomes much easier to learn and understand. – Rachel Oct 16 '12 at 16:03

5 Answers5

20

This is my recommendation.

  • Use MSDN
  • I started with this site: wpftutorial
  • Learn MVVM pattern. This is a good article.

There are a few MVVM frameworks. This question may help you to choose one.

Amir Rezaei
  • 10,938
  • 6
  • 61
  • 86
11

I've just been through this, so it's fresh in my mind.

Core are: Dependency property system, Routed Event system, Commands, Binding, INotifyPropertyChanged, Styles, Control templates, Data templates, Hierarchical templates, Triggers, Resources, ObservableCollection

Pattern wise: MVVM, Unit of Work, Repository and DI/IOC. MVVM is the main one, the others just appear frequently. There are a lot more frameworks around now than when I started in WinForms. Microsoft's Patterns and Practices site is worth looking at, Prism is pretty good.

Pro WPF in C# 2010 by Apress is my favourite book on the subject, others good ones include Illustrated WPF, WPF 4 unleashed and Sams teach yourself WPF in 24 hours. The last one is easy to get through in an afternoon and will cover the above in enough detail to get you started.

I created a diagram a while ago showing how most of the core WPF objects fit into a hierarchy. It's fairly interesting, I'll try and publish it somewhere and add a link here later.

Try and ensure the project you work on is using WPF 4. Visual Studio 2010 is much nicer, and WPF 4 includes a lot of substantial fixes that make it more reliable, faster and generally better.

Edit: I've just added the class hierarchy diagram I mentioned. It's good for an overview I think. Take a look and let me know if there's anything that looks wrong :)

WPF Class hierarchy

Ian
  • 5,462
  • 22
  • 26
1

I've found WPF Programmer's Reference by Rod Stephens really good. It's not a reference manual, but it is written by someone who can explain things. It won't last you your entire WPF career, but it will shorten the initial learning curve.

Andy Brown
  • 11
  • 1
1

I'm working my way through WPF in Action. It's a little dated by now, but it provides a good introduction to things. I am planning to follow up with WPF 4 Unleashed to catch up on the differences between 3.5 and 4.

I tried starting with the Unleashed book first, but it was moving a bit too slowly for my liking.

Adam Lear
  • 31,939
  • 8
  • 101
  • 125
0

For an introduction to all the controls etc. I found it usefull to look at the samples in ms sdk - approximately here:

C:\Program Files\Microsoft SDKs\Windows\v6.1\Samples

The SamplesGallery inside WPFSamples.zip has a nice overview of many of the wpf controls, binding, animation etc.

One of the books I found usefull were:

http://www.amazon.com/Windows-Presentation-Foundation-Unleashed-WPF/dp/0672328917

It has a lot of the good details you ask for when you already know winforms.