I've been using Winforms since .NET 1.1 and I want to start learning WPF.
I'm looking for some good resources for a beginner in WPF. What should I read, what tools do I need, and what are the best practices I should follow?
I've been using Winforms since .NET 1.1 and I want to start learning WPF.
I'm looking for some good resources for a beginner in WPF. What should I read, what tools do I need, and what are the best practices I should follow?
Please have a look at this StackOverflow post, which has a list of book recommendations.
In terms of best practices, get familiar with the M-V-VM pattern. It seems to have gained the most traction in WPF-land.
Check out this post for what tools you can use for WPF development.
The MSDN Forum is a great place for resources, as is the MSDN help files on WPF.
My personal recommendation is for you to forget everything you have learnt about WinForms. WPF is a totally different model, and once I finally dropped my "I did it this way in WinForms, but that way doesn't work in WPF" I had one of those "lightbulb" moments.
Hope this helps!
The learning curve is high, but there are a lot of really good resources out there. And, the MSDN documentation and SDK samples (as some have already mentioned) are really good.
One thing that will help you though, is just to acknowledge the learning curve up front, and to not get discouraged when it doesn't make sense. There really are a lot of concepts to 'grok' before you can do some even basic things.
The WPF books already mentioned are all valuable in their own way. My personal experience was that I got a copy of WPF Unleashed first and tried reading it to no avail. It wasn't until I picked up Charles Petzold's Application = Code + Markup and read through some of that ... before I could even begin to understand WPF Unleashed. However, my brain needs detail before concepts actually sink in ...
Tim Sneath has an excellent list of WPF bloggers that I have found valuable to get hooked into the WPF community: WPF Bloggers
A few blogs on my must read list:
Another thing I would do is get Dr. WPF's snippet library (located here). This is an extremely good way to learn some of the basic plumbing type concepts like Dependency Properties, Routed Events, and Routed Commands.
Finally, I would get a copy of Blend (v2.5 is still in beta and free) and use that to generate xaml and then dive into that generated xaml to understand what you did in Blend, maps to the WPF API.
Hope this helps. Good luck.
1 Start understanding the XAML and control heirarchies - UI markup and the new terms and features around it. KaXaml is a great tool to learn XAML, It is free to download http://www.kaxaml.com/
2 Since you have already got a long .NET experience, go directly to the SDK Samples and start running in it and see what is happeing, play with XAML. http://msdn.microsoft.com/en-us/library/ms771449.aspx
3 If you are looking for Blog resources here is my best suggestion
But selecting a simple UI scenario which you already implemented or saw somewhere and try implementing it in WPF - That is probably the best approach to learn a new technology.
And please dont get afraid of MVVM , those things will come handy later once you got familiar with WPF platform and XAML.
I'd recommend the book Windows Presentation Foundation Unleashed by Adam Nathan
Then I'd recommend you write an application. Like every other dev environment, there are no perfect guidelines. You have to find the ones that make the most sense for your circumstance. The only way to do that is to just start coding.
As for tools, Visual Studio 2008 [Express] is your best bet. Or you might be able to limp along with XamlPad.
I would also highly recommend using Blend together with VS 2008. Blend is great for creating animations.
The Blend 2.5 Preview can be freely downloaded.
I like the Designer WPF Blog, which has some good tutorials on how to do WPF stuff in Blend.
Although already listed above, I wanted to reiterate one point.
Kaxaml is bar none, the best loose xaml editor out there. It has a snippet library, IntelliSense, split view, a xaml scrubber (pretty print), and more.
I only wish we could hook up some assemblies (that you could reference from the xaml) ...
Robby Ingebretsen, you rock.
I would humbly also suggest taking a look at my blog, 2,000 Things You Should Know About WPF, where I post a single piece of information on WPF each day. The blog starts with first principles and gradually works into more advanced topics, so it's a good place to start, as a beginner.
Mastering WPF (and silverlight, and basically any vector based XAML .net rich UI framework) requires more than understanding the new development concepts (and there are many). Its not enough to fully understand dependency properties, attached properties, templates, data binding, styles, MVVM, the layout mechanism, visual states and parts, effects, routed events... To really know your way around, you need to understand some basic concepts in graphics (such as vector graphics, raster graphics, rendering, layered graphics techniques, animation, pixel shaders, gradients, geometries, paths, brushes, transformation matrices, etc). In addition to that, you need to learn and understand M-V-VM which is not just a new design pattern - its a whole new programming paradigm. So there is a lot to learn... and the problem is that no matter which starting point you pick, you always feel that something is missing.
I tried several books as a starting point and many of them got me quite confused. Then I found "Illustrated WPF" by Daniel M. Solis and this one did the trick for me. He explains concepts from the world of graphics in a way that is clear to developers, and then teaches all the new concepts of XAML based UI while lightly touching each topic and diving into specific topics through a demo. Simply by following the tutorials, you find that you have learned a lot, and more importantly, removed the fear factor.
Once you master that, you can move on to "WPF Unleashed" by Adam Nathan and dive deeper. This one gives you a much more In-Depth view of the concepts that are unique to WPF, which I believe you have a much better chance of understanding once you have seen each feature at least once. They somehow all complete eachother and only make sense together.
You will still have tons to learn after that, but at this point you can develop rich applications and learn new topics as you go...
Enjoy :-)
Visual Studio 2008 (there's a free Express version). That's all the tools you need.
Then try some How-to videos. Here's a good start: http://windowsclient.net/learn/videos_wpf.aspx
Microsoft actually has a decent introduction on MSDN: http://msdn.microsoft.com/en-us/library/aa970268.aspx
One resource I found that really helped me was from jfo's coding: http://blogs.msdn.com/jfoscoding/articles/765135.aspx
The document is entitled "WPF for those who know WinForms", which is exactly the position I was in last year!
© 2022 - 2024 — McMap. All rights reserved.