A Beginners Guide To WPF

I have been working with WPF a little while now and have published a fair number of WPF articles over at codeproject but in one of them I was slammed for writing a intermediate article that had been mistakenly classified as a beginners article.

At first I was a bit annoyed at this, but then I started to hunt about, and there really aren’t that many beginners articles for WPF, so I decided to write a beginners WPF series. This series will be structured as follows:

Part 1 : Layout

Part 2 : XAML vs Code / Markup Extensions

Part 3 : RoutedEvents And RoutedCommands

Part 4 : Dependancy Properties

Part 5 : Databinding

Part 6 : Styles/Templates

End of series Exemplar


I hope they are useful to someone. Have a look for yourself

Advertisements

31 thoughts on “A Beginners Guide To WPF

  1. Karl Shifflett says:

    Sacha,

    Very cool! I look forward to reading and learning from all of them.

    Cheers!

    Karl

  2. sacha says:

    Thanks Karl

    Dont think I’ll be teaching you much though bud..its very basic stuff, for beginners, not advanced WPF masters such as you.

    But thanks anyway

  3. Martin says:

    Sacha,

    you’re one of these guys that make codeproject the best developer portal i’ve ever seen.

    every search for a developing question takes me to codeproject.

    and every search for wpf takes me to your articles!

    Great!

    I hope you have a lot of time to write more articles on wpf!

    Martin

  4. sacha says:

    Martin

    I thank you very much for these kind words. For me I just love to share stuff, and write articles you learn so much doing this.

    For me Josh Smith / Karl Shifflett are my codeproject heros. And Daniel Vaughan / Marlon Grech are excellent as well.

    Also you will be interested to know that my next WPF article in this series will be available today (Sunday 20/01/07) and the 3rd part maybe by next weekend.

  5. Michael Sync says:

    I thought I wrote a comment here. but I didn’t see it now..

    Thanks a lot for writing great stuffs, sacha..

  6. sacha says:

    Michael you are most welcome, even as an author you learn a lot by writing articles.

  7. Shay says:

    Sacha
    I know I should think of the environment and all that stuff but I did notice that the print versions of your cool ‘Beginners Guide To WPF’ articles are chopping off text (only article 4,5 and 6) I have tried this in Firefox and IE.

  8. sacha says:

    Sorry to say it looks A-ok this end, in FF IE and Opera, Maxthon…they all look fine.

    GRRR..

    I really try and get the formatting ok…I really do…Sorry..but if it just looks fine here.

  9. Naveen says:

    Is it possible to create CAD application in wpf?
    If yes then is it feasible?

  10. sacha says:

    Sure CAD app would work in WPF

  11. verrigo says:

    Hello Sacha,
    I have been following your articles more and more and your thoughts on WPF. I really like what you did with Marsa X, showing that one can really make some very interesting UI if one tries hard enough. While i haven’t been really interested in WPF prior to reading your articles, you got me really interested so much so that i went to my boss and proposed that the next big project of a window app have a WPF interface. I was really excited when he said ok, that sounds cool. I do not want this project to be delayed on account of the interface, so i should start learning WPF ASAP. I know that somewhere on your website or on codeproject you mentioned some great books on WPF and some tools (like Blend and such). Can you please post them again? Also, this project will have an n-tier architecture. My question is: Can i use WPF only for the presentation layer and have the Data Access Layer and Business Logic too?Thank you and i hope my questions where not stupid enough so as not to be answered(keeping fingers crossed on this one:D)

  12. sacha says:

    Im glad you liked MarsaX, I thought it was cool too.

    As far as N-Tier goes, these days what we are doing at work is using N-Tier as follows

    WPF (Presentation layer) using the MVVM pattern.
    WCF for the service layer to retrieve stuff from a business layer Dll, which hooks into SQL server.

    So yeah its all possible.

    Hope you have fun learning WPF, its a big beast but its very rewarding.

    I like my Tabber3D article also, have a look at that one.

    A far as books/tools go:

    The best book by far is : Pro WPF, Apress, Mathew McDonald
    The tools : VS2008, Expression Blend, and I like Fireworks/Photoshop.

  13. verrigo says:

    Hi Sacha,
    Thanks for the info. I took a look at your tabber3d and i was amazed. I also found other articles on codeproject written by you and the UI is so amazing.
    I would love it if you would be so kind as to mention some books on the MVVM pattern. I searched the net and found some links, but didn’t really understand the architecture. (I guess i should start learning a lot more about WPF and then worry about that, but things are moving a lot faster at work then i anticipated in using WPF in apps so i need as many books and references available).
    Thanks so much for your input and keep writing:)

  14. sacha says:

    There are no books that cover MVVM as its still very new, the best thing available are blogs etc etc.

    But they are good enough to get the ideas.

    Good luck with the learning, I am trying to learn WF right now, thats fun also.

  15. Alex says:

    Hi. I have a question about DataTemplate and DataBinding.
    The question is how to create DataTemplate dynamically from code and attach it to the ListBox(for example)?
    So I have ListBox defined in xaml:

    and I want to create DataTemplate with StackPanel and couple of TextBlocks. How can I do it from the code?

  16. Alex says:

    So I have MyListBox defined in Xaml, and in code this:
    DataTemplate dt = new DataTemplate();
    // here I need to fill the dt with stackpanel and something
    MyListBox.ItemTemplate = dt;

  17. sacha says:

    Have a read of this post, I answered this question there

    http://www.codeproject.com/KB/WPF/BeginWPF6.aspx

  18. Abhijit Jana says:

    Hi Boss,
    Nice to see a complete site from you. This are the my first article from where i am start my journey to WPF ( From Code project WPF part 1 to 5 ). WOW… How Organized Article those are……..

    Thanks for your Efforts !!!

    Cheers !!!
    Ur student Abhijit 🙂

  19. sacha says:

    No worries, hope they help you out.

  20. Manas says:

    What is the Future scope of WPF in desktop based Applications?

  21. sacha says:

    Well you know you are asking a WPF enthusiast, so for me it is the future of rich apps.

    As far as what is happenning with it, you should check out the recent mix videos

    http://blogs.msdn.com/mswanson/pages/MIX09Sessions.aspx

  22. Mahesh says:

    You are the man, its very tough to and need great patience to write above detailed and clear articles.

    Mahesh

  23. sacha says:

    Thanks Mahesh

  24. vaibhav says:

    Hi i am vaibhav i want to develope a remote desktop application in c#.net as my final year project.
    can you please help for what type of API can i use for building it.

    Waiting for your reply at vaibhav228@gmail.com
    Thanks

    • sacha says:

      Just use the Microsoft Terminal Services Active X Com control is a C# project either Winforms or WPF. Easy

  25. muralekarthick says:

    Hi i am Muralekarthick, i am a MS student, i am developing a windows application for a small concern, they want a really functionally rich UI, so i thought of WPF would be a good idea, can you give me some idea for good user interface designs and examples, can i get horizontal tabbed view of windows in WPF, which control i have to use for it , can you help me please i am very new to WPF, am very much quite interested with ur articles, take as ur student.

  26. muralekarthick says:

    And also can you clear me one thing will WPF windows application work fine with IE6 xp systems which is been used in the client side please.

  27. Alexander says:

    Hi Sacha. I was told you wrote the book. Is it coorect?
    When it’s published? Thank you, Alexander

  28. a says:

    Hey there! I know this is kinda off topic nevertheless I’d figured I’d ask.

    Would you be interested in trading links or maybe
    guest authoring a blog article or vice-versa?
    My website goes over a lot of the same subjects as yours and I think we could greatly
    benefit from each other. If you happen to be interested feel free to shoot
    me an email. I look forward to hearing from you! Superb blog by the way!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: