How to begin WPF development?

后端 未结 13 1772
迷失自我
迷失自我 2020-12-02 04:56

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

相关标签:
13条回答
  • 2020-12-02 05:37

    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 :-)

    0 讨论(0)
  • 2020-12-02 05:38

    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.

    0 讨论(0)
  • 2020-12-02 05:43

    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!

    0 讨论(0)
  • 2020-12-02 05:53

    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!

    0 讨论(0)
  • 2020-12-02 05:55

    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

    • Josh Smith - http://joshsmithonwpf.wordpress.com/
    • Dr. WPF - http://www.drwpf.com/blog/

    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.

    0 讨论(0)
  • 2020-12-02 05:57

    Adam Nathan's - WPF Unleashed, book is very good.

    0 讨论(0)
提交回复
热议问题