Applications = Code + Markup: A Guide to the Microsoft Windows Presentation Foundation



Price: $37.79


Applications = Code + Markup: A Guide to the Microsoft  Windows  Presentation Foundation (Microsoft Press) - September 2006Publisher: Microsoft Press - September 13, 2006

ISBN-10: 0735619573, ISBN-13: 9780735619579

Author: Charles Petzold


1020 pages


Applications = Code + Markup: A Guide to the Microsoft Windows Presentation Foundation





Customer Reviews

A must have C# programming reverence

The Petzold books are some of the best for C++ and C# and WPF programming. The drawback to the approach Petzold uses is that one must still invest in another book or two by another author to get the full picture. Petzold for good reason works from the basics and does not use the Visual Studio wizards for the most part. It is important to know both however when developing code. But even so, this is an excellent reference book that has helped me immensely in learning and using C#, WPF and XAML.

Michael Poore
11 March, 2010


This is it!

The writer takes you by hand, and leaves nothing in luck.
Since the best and fastest way to learn is to leave no voids, this is the fastest way of leatning WPF. I am amazed by Petzold. He is a master. Very clever examples.

P. Dimitrios
15 January, 2010


Don't bother

Petzold failed on this one.

You can only loose time reading it. the author clearly missed the concept here. Yes introducing XAML from the first chapters IS important and also important are images and graphics on a book like that (not to make you understand the concepts, that's not the reason of course). In a later book of Petzold about 3d graphics he starts immediately with xaml.

Difficult to follow with unneccesary hardships. Sorry, cause otherwise Petzold is a great author and teached many things regarding MS's product line.

P. Dimitrios
15 January, 2010


Mr. Petzold writes the best books.

There is one rule on buying books that is sure bet. If it's written by Charles Petzold then it probably the best book on that subject. He is smart, clear, vivid, and even scatters a bit of fun in there too. I have never met Mr. Petzold but have many of his books. If you are in college wanting to choose books ALWAYS pick his if you want the competitive advance and high student satisfaction. Whenever I use his books in the classes I teach they get good reviews.

Rick A. Morelan
15 August, 2009


Mr. Petzold writes the best books.

There is one rule on buying books that is sure bet. If it's written by Charles Petzold then it probably the best book on that subject. He is smart, clear, vivid, and even scatters a bit of fun in there too. I have never Mr. Petzold and but have met many of his books. Buy his books as he about the best technical author you will ever find. If you are a college wanting to choose books ALWAYS pick his if you want the competitive advance and high student satisfaction. Whenever I use his books in my classes they get raved reviews. He really keeps your attention and turns your curiosity into enthusiasm.

Rick A. Morelan
15 August, 2009


Excellent book on windows based graphics

I am still on chapter one, going through the book while coding the examples and learning from them. It is a good thorough description of what you can do with wpf. I'll add to this when I am finished.
Leon

Leon Rogson
30 November, 2008


Disappointing Title from an Amazing Author

Over the last decade I've been reading books by Charles Petzold; until this one I enjoyed them all. I consider Petzold to be one of the best Windows development authors out there. He's been writing about it since Windows was became Windows. Most of his titles offer well thought out and presented material. This book did not.

Twice I attempted to read this book as my introduction to the Windows Presentation Foundation. Both times I failed to advance my mark more than a few hundred pages. There are absolutely no illustrations, screenshots or pictures of any kind. This fact forces the reader to type up his numerous code samples to see their output. While I enjoy having many samples in a book about programming, I don't always need to type up the program myself to understand its meaning. Call it teaching to all the senses, but I like more visuals.

My other complaint with the book is that while reading it I constantly feel I'm not moving anywhere. Most other programming books I've read I felt like I could go out and use the tool, even if it was only a fraction of its functionality. With this book I constantly felt like I had to wait until the 2nd half, the XAML discussion, to really use WPF. Yes, I could write a GUI by programmatically instantiating all the elements, but that isn't the way the technology was meant to be used. I would have enjoyed a brief introduction to XAML and its use throughout; only waiting until the end for diving into its deepest intricacies.
In the end, I couldn't finish this book and purchased a different title.


Ryan P. Sommers
09 September, 2008


The WPF Book I was waiting for

Every book I had read so far on WPF sidestepped the basic premise behind WPF -- that it was a brand new platform and a new programming paradigm, which will eventually replace WinForms. How did they do that? By glorifying XAML and everything that it could do for you, turning Windows programming into that trash called HTML, which most Windows programmers stay away from. When I read Nathan Adams' highly touted book, I couldn't get past that 3rd chapter. Chris Sells? About the same. The problem was always the same -- each of the aforesaid authors unnecessarily burden you with XAML when you are already trying to get your head around the WPF, thereby glossing over some very, very important concepts!

Charlie Petzold is that seasoned veteran that started doing Windows ever since Windows came into existence. He takes a truly novel approach in teaching you about WPF. He starts off by first telling you about WPF in the language you are most familiar with -- C#. He explains all the concepts, all the ideas, all the tenets. All in C#. And then, when you get familiar with all of that, bam! He hits you with XAML. He then starts showing you how you can do all of the things that he showed you in C# -- in XAML. But by this time, you are no longer struggling with the concepts of WPF. You already know what DependencyProperties and RoutedEvents are. You are already aware of virtual trees and logical trees. So now, when you see them represented in XAML, it makes so much more sense. And it's all easier to comprehend.

The simplest analogy I can give is this: remember the time when you started learning calculus in high school? That was a new enough concept, right? Now imagine if you had to learn that in German (or your non-native tongue)! But once you learn all the concepts in English, you could very well proceed in a language you weren't quite as familiar with.

To me this is the only way I could have learned WPF. And XAML. I was pushing off WPF all these days only because XAML was getting in the way of my learning. While a lot of Web-programmers will be happy for XAML, the fact is, declarative programming is not something Windows programmers are used to. To them, the only way to approach the subject is to first teach them WPF and then show them how XAML comes in the picture.

Having said that, there are a two extremely irritating aspects to the book that start rearing their annoying heads by the time you get to the second chapter:
1. There are no graphics showing outputs from the code. Granted you are expected to run the code samples (which can be downloaded from the MS Press support site), but I shouldn't have to run every single code sample. Moreover, there are times when I'm reading the book on a crowded train, when I can't really run the program on my laptop -- there's barely room to open the book as it is.
2. Every program is a Console app. So after you hit the F5 key, the annoying console window gets in the way of viewing the main Window. You have to minimize the window, or move it in order to see the Window (Form). According to Petzold, it's convenient for him to hit Ctrl-C on the Console window to terminate the program. Note to Petzold: Chuck, have you tried hitting Shift-F5 on your IDE? I find this so debilitating that I had a utility converting every single csproj file in the folder tree from a console to a Windows application.

Aside from that, the code samples run perfectly. I'm on Chapter 11, and so far every single code sample works.

If you are a seasoned Windows/C# programmer facing similar mind blocks against XAML, this is the book for you. If you are a Web programmer for whom C# is subservient to VBScript, or JavaScript, and are comfortable with HTML, this may not be the right entry point for you (as evidenced by some of the low ratings that this book got). You may need to get in via XAML, and a book that overly emphasizes its importance (such as Adams or Sells) might be the way to go.

Pat Chipdey
30 July, 2008


If you don't have this book then you don't know WPF!

This book is ESSENTIAL for any WPF engineer. There are so many topics covered in this book that will allow you to take your WPF applications to the next level. Charles' style of writing is fantastic and easy to understand. I wouldn't neccessarily recommend this to be the book to learn WPF fro but consider it an essential source for advanced topics.

MrPerphekt
17 July, 2008


The dust has settled. This is a terrific book.

Each chapter is well thought out and develops like a good narrative. Chapters are typically 20, 25 pages and thoroughly explain a central concept. They often end with a nice lead-in to the next chapter, like "this works, but what if you wanted to ...?"

When first published, no one knew what WPF things like StackPanels looked like, so people wanted screenshots everywhere. The book uses a series of concise console applications to demonstrate WPF concepts. I'm glad it does. With a screenshot on every page, the book would be 50% thicker or have less detailed info.

The console apps are self-contained little apps that generally demonstrate one aspect of a WPF feature. After a few chapters, I realized I needn't read every line of code carefully, since the author gives an intro on what to look for in the sample and often an explanation after the example about any non-obvious lines of code.

Other books have their place. I have several others because I sometimes want to examine some topic from several authors' POV. But for taking a programming concept and building a full explanation in clear, logical steps, no one does it better than Mr. Petzold.

Whether you are going to build next-gen Windows apps or develop Silverlight 2 applications, learning WPF and XAML is essential (just as web designers must sometimes work directly with html).

Visual Studio and Expression Blend make assumptions when you drag elements onto the design surface. It's easier to work directly in XAML rather than delete extraneous properties these tools add to your code.

Some criticize it takes half the book before delving into XAML. Anything in XAML can be done in C# (or VB), so starting with the code is a logical foundation for understanding. For things that are easier to wire up in XAML, the author points forward to those chapters. By the time you get to chapters on XAML, if you know anything at all about it, you'll fly thru the pages, filling in gaps about how code and markup work seamlessly together.

I cannot imagine thoroughly understanding WPF without having this book's comprehensive explanations available to me. I think it's a terrific book that will stand the test of time.

A. Avrashow
04 May, 2008


It May Not Be Pretty, But It's Pretty Good!

This book seems to have had several negative reviews.
The gist of most people's complaints seem to be:

(a) "There's no XAML until Chapter 19" and/or

(b) "There aren't any pictures".

The Complaints - are they justified?

a. No XAML

People making this complaint have in my opinion totally missed the point for several reasons.

Firstly, this is not Charles Petzold's "How to Write XAML" book. It's a book whose title explicitly tells you that it will approach WPF from both the code (C#) and markup (XAML) perspectives. Unusually (actually I think it is uniquely) he doesn't mix and chop up the two approaches, but deals with each of them in isolation.

Secondly, WPF is not XAML. You can use XAML, sure. You'd be silly not to in many situations. But XAML is only one part of the big picture. As this book clearly shows, you can successfully create an awful lot of WPF output with code alone.

b. No Pictures

Normally I would have some sympathy with Complaint (b) because it's always nice to see what the code samples should produce. But if you use this book as the author intended and actually run the samples yourself you will gain far more than any quick glance at a screenshot would give you. You will gain insight and experience in how to master this new technology.

The Book

This is a book that very carefully works its way through the requirements needed for the reader to achieve a thorough understanding of the major concepts. One of the reasons why I recommend reading it - and using it - from cover to cover is that, even in the early basic chapters little gems of code and explanation are slipped into the narrative or the examples. Often these begin to deal with more complex topics that you will come on to in more detail later.

It is crammed full of detail. Mostly it's the kind of detail that you really need once you've got past the "let's play with WPF and see what you can knock out in a couple of hours" stage. The detail you need when you move on to the point where you want to do something that isn't necessarily easy out of the box, but is achievable if your understanding is built on stone, not sand.

If I have a complaint, it's a minor one: occasionally he lets the Math geek get out and play a bit more than strictly necessary, but even that is fairly rare.

The code samples are in C# only. However, Young Joo on the VB Team at Microsoft has organised for some chapters to be translated to VB.NET and there are more to come. You can access them from here: http://blogs.msdn.com/vbteam/archive/2008/01/07/petzold-wpf-book-sample-conversion-new-chapters-young-joo.aspx .

Summary

If you are committed to fully understanding WPF then this book is one you really should buy. By all means get others too. I already have several; they all serve their purpose, are very useful and I refer to them regularly. But when it comes right down to the "roll your sleeves up, go sit in a quiet place with book and PC to learn, really learn, WPF" then I think Charles Petzold has produced a (not so little) gem that will be truly helpful to you in your learning endeavours.




G. Mead
20 January, 2008


very disappointing

I've been a Windows developer for around 10 years or so and have read dozens of developer books. This is only the second one I can remember returning.

I had previously read Programming Windows Presentation Foundation (Programming) (which I recommend) but was looking for more. At 900+ pages, and with the good reviews and experience of the author, this book looked like a good choice. Unfortunately, after the first 450 pages, I decided that my time would be much better spent simply rereading the the Chris Sells book instead.

The main problem is the style in which the book is written. It could easily be edited down to half its size. How many times do I need to read "Button btn = New Button()" in a code example? I know some people prefer fully functional examples over code snippets but after a while it really got ridiculous. The code examples eventually became almost useless to read because it became so much work to sort out the irrelevant and insignificant details. On top of which 90% of the code samples are examples of THE WRONG WAY to do a UI in WPF (i.e. in C# instead of XAML). I understand the second half of the book is all XAML, but spending 450+ pages on techniques you would NEVER ACTUALLY USE is a waste of my time.

A lot of bloat also came from a lack of focus on who the book is written for: experienced .NET/C# developers. I don't need to have "using" statements explained to me, I know how .NET dialogs work, etc... From the "Printing" chapter: "The Print dialog also includes a Number of Copies field. Enter a number greater than 1 in this field and the PrintVisual method prints multiple copies." Really. I never would have figured that out on my own.

There is a lot of good information here but it is simply not worth the time it takes to extract it from "Button btn = new Button()" statements. Maybe this book is a demonstration that you're never to old for an editor. I'm going back to O'Reilly books.

Z. Morris
20 July, 2007


I appreciate this book so much

I think that Petzold was reading my mind when he wrote this book. I don't like XML, and I don't like "cheating" with XAML when you can write good clean C#. The first half of this book is entirely C# programming in WPF. I am using this book to help me write an abstraction layer above WPF. That simply would not be possible with XAML, which in my opinion places the design of the application at too low of a level. Petzold leaves no stone unturned, and whenever something seems weird, he doesn't ask us to trust him that it makes sense; he explores it in depth for us. I can't imagine that many other authors go through that kind of trouble when they're writing on tight deadlines. Petzold tells it how it is, and he includes the "why." Therefore, I recommend this book to anyone who strives to become a bit of an expert in WPF, not just a get-the-job-done programmer. I would consider this an advanced book at times because I find myself reading and re-reading sections to understand it. The explanation is there, but it's not trivial, and with so many pages in the book already, there is no room to be wordy.

Dale A. Barnard
14 June, 2007


WPF and XAML explained.

Written by a professional for the professional! This book reminds one on how things aught to be done in C# and gives an insight of WPF and its mechanics. A must have book for the serious developer and even the amature will benefit from Charles Petzold insight.

DTW Norton
29 May, 2007


The Other Side of WPF

I purchased this book late last year, took a vacation and spent a week reading it cover to cover. Since that time I've written several production WPF applications of moderate complexity that are several generations beyond the WinForms and WebForms apps I had been writting. Several months ago, when it was released, I also got to read Adam Nathan's book on the topic of WPF. Having read both books and used WPF to produce better apps under the usual deadlines, I can honestly say that I benefited from the additional insights gleaned from both books.

When I read Petzold's book and saw the code first approach with XAML introduced later, my impression was this seemed contrary to the preference to XAML I saw espoused in other sources and beta books. As I reconciled this new technology being taught by a long tenured veteran, I got a feeling that perhaps earlier concepts around Win32 UI programming may be the lens through which the author is presenting the material on how to best apply WPF. Needless to say, I paid attention and got more value than I anticipated and beyond what I learned from his WinForms book of similar size. While Adam Nathan's book was a more efficient read for me, and one that I could appreciate in its attention and orientation to the more mainstream presentation of WPF, I think that later book in conjunction with this one is quite useful.

My real critique of Petzold's book was that it should have played more to the what may have been the author's strengths in elucidating the API and imperative coding in WPF. Such an approach may have been a great book as a complement to the many XAML focused ones to follow. I believe the API focused chapters that do exist makes Petzold's book a great contribution to WPF knowledge and application. Sure, in my day-to-day I strictly enforce the UI separation by defining a majority of UI elements in XAML. Without Petzold's book I probably would have went further in this approach. Yet, in reading his material I was reminded of and given an appreciaton for the techniques and the potential benefits of using the WPF API more explicitly to peform a range of tasks that works in concert with XAML declared elements to provide the complete solution.

For understanding the benefits and mechanisms of the WPF API this is a great complement for the many XAML dominated books out there. I rate it a 5 because I learned a greater variety of interesting details related to the WPF API than I would have been predisposed to explore or unable to find just using the MSDN documentation. For WPF API knowledge and understanding that can enhance the code side of solutions defined to a greater or lesser degree in XAML this is a great buy.

Michael Gautier
20 May, 2007


Nice cover, bad content

The writer is a guru in the field of Winforms applications.
The first part of the book is rather from this angle, the Second part discusses the markup (XAML). The book contains much code (C#), enumerations and is as a result, badly readable.
It contains no information about the technique behind the WPF, essential for understanding the new generation of applications which you can make.

If you want to learn the WPF I reccommend the book "Windows Presentation foundation Unleashed" of Adam Nathan. That one is filled with colours impressions and examples, very usefull working with markup.

S. B. Bosch
08 May, 2007


Fails for lack of XAML

The simple fact is that Peltzoid completely misses the point of XAML. He ignores it as if it was a toy, and not a technological breakthrough in the separation of UI and logic. Shame.

William Sullivan
03 May, 2007


Well written

This book explains WPF in a very simple manner. Petzold has hundreds of examples and progressively builds upon the previous examples to show more and more complex scenarios. As other people found, the lack of pictures made it harder for me to understand what the author was trying to explain. Also, the Code and XAML are covered in two separate sections, which makes it harder to make the connection. But definitely a book to have in your collection.

Ravindra Okade
27 April, 2007


The book allowing developers to gain the knowledge necessary to use tools effectively

This is just the book that is needed to allow developers to gain the knowledge necessary to use tools effectively.

In programming, explicit explanation is always better then implicit, allowing a developer to gain the knowledge necessary for understanding and reasoning over software.

In my opinion the proper place of tools, is not to relieve developers from the requirement of learning the details of a framework, where they can program without a base of reference for reasoning over the framework and its API's, but make the lives easier of those who understand the underlying API's and object model. This book is that base of reference for reasoning over WPF.


Anthony Tarlano
02 April, 2007


Just my 2 cents

Contrary to alot of reviews I really liked this book. i did like the style of Charles writing which kept me moving from chapter to chapter.

I also liked how Charles would explain how things worked under the covers as I feel this gives a better understanding of the whole platform as a whole.

True there are no pictures but then you can always just run the examples on your PC.

David
20 March, 2007


Great WPF tutorial for real world programming

This book does a great job of teaching a professional programmer what they need to know to create real applications. The author does a good job of teaching elemental concepts that build into large complex concepts. The author recently stated in his blog: "Applications = Code + Markup is not for wimps. It's for programmers who seriously want to learn WPF -- both code and XAML." I totally agree. This book is real meat for serious programmers.

Kerry Jenkins
05 March, 2007


Just Awful

I was so disappointed with this book that I returned it. That's the first programming book I've ever returned.

As a tutorial, this book is utterly useless. In fact, it is worse than useless, since it is a huge waste of time and teaches poor UI programming practices such as manually putting your UI and layout into code.

The book is terrible for people new to WPF. It dives into Brushes for most of the first chapter. That's a topic which can be ignored until much later; brushes are about polishing the look of a UI, and are not useful as a starting point when you want to dive into the code. Or perhaps, you believe the power of WPF is best shown through fancy gradient brushes? OK, but.. there are no pictures in the book! That's a ridiculous thing for a book about a UI definition language!

BTW I pick on the chapter about brushes but it's a consistent pattern in the book. Not until about chapter 4 or 5 do you even get into a UI with more than one control. And not until about 60% of the way through the book, do you even see a single XAML example! WPF's power comes from the separation of code + markup, something you would expect THIS book to get right. But you don't even see how that can be accomplished until you are already bored to tears writing gradient buttons in code.

Or, how about using this book as a reference? You will find MSDN to be a much more accurate and complete reference. And due to the majority of the book being written in code (no XAML) you will not want to use or emulate any of the examples anyway. The only hope you have is to examine the code and then translate to XAML yourself.

Save yourself the aggravation. Get "Windows Presentation Foundation Unleashed" instead, or practically any other WPF book on the market.


T. Kludy
27 February, 2007


Not as good as it looks like

I see it has 4 star and then got one copy. Generally speaking this book is pretty much like MSDN online documentation. I had expected that it could present some advanced topics on how to write application in WPF, but it did not. However, it is still a good reference for programming WPF. Another book by Adam Nathan, as I read in the book store, is much better in this regard.

Bizsoftzen
27 February, 2007


Not the best book on WPF

This book was obviously rushed to market. While Charles' excellent writing style almost makes up for the lack of illustrations, organization and layout, it does fall short.

I highly recommend Windows Presentation Foundation Unleashed (WPF) (Unleashed) by Adam Nathan instead. Adam is every bit Charles' equal in writing clear prose and both he and the publisher went the extra mile (and a few months work) to "get it right".


John Irwin
21 February, 2007


Solid Subject Book

This book provides great insight and understanding to WPF and c# .Net 3.0 for our development team. A lot of our training now comes from subjects and ideas in this book. If you are working in this new framework, it is should be considered as a must have!

ka
16 February, 2007


Excellent job, dear Charles Petzold!

The best book I have ever read since "Programming Windows" (with or without C#)!

Radoslaw Rzepkowski
12 January, 2007


NOT an intro to WPF. Not a "Guide". Not even a good reference.

Charles Petzold is a well-deserved legend in the field of Windows programming books and has probably influenced more Windows programmers than any other author. I was anxious to learn from his views on managed code and the amazing strengths of WPF but his book was significantly different than my expectations.

Petzold totally ignores the powerful WPF tools and support available in Visual Studio 2005. Instead, over 90% of his book is devoted to very short programming examples of how to do extremely low level tasks in C# and in hand-coded XAML. It would have been helpful if these two approaches were shown side by side so the differences in approach and detail could be easily digested. Instead, for reasons I do not understand, Petzold chose to separate matching task examples by half the book's pages, covering C# and XAML in two completely isolated sections.

Petzold appears to be stuck in the mindset that prevailed when Windows was an infant and no programming tools or high level languages existed. During those days, his books provided the only legitimate source for the low level detail required to succeed in creating Windows programs. But, it's 2007 and Windows has a rich environment of powerful tools, frameworks, and modern programming languages to make rapid program development much easier and much safer. WPF is a significant leap forward that deserves exposure in context with today's programming environment. Petzold did not do that!



Richard Schulthess
11 January, 2007


Excellent attention to the details

Petzold has performed a lot of research and wrote a "honest" book, needed by people who will be making their living from WPF programming. This is how you learn WPF:
1. Play with studio/ms expression a bit.
2. Read Chris Sells book to get a general overview. You can skim the surface here.
3. Read Petzold's book _thoroughly_, not missing a thing. About 90% of it is actually _matters_.
4. Program WPF!


Sergey Aldoukhov
13 December, 2006


The definitive guide to WPF

This is a very thorough book split into two parts. The first half covers WPF from a C#/code-only view. The second part is mostly WPF via XALM (rhymes with camel).

The first half covers WPF via code in C#. The material is very dense and 453 pages! However, the author presents the material that you are most likely to use. He includes great explanations of how you should use the API. So, instead of guessing (coding by coincidence), he gives you the information you need to be successful. Interestingly, there are no pictures in the book. The only way to see the code samples in action is to run them. However, he offers suggestions of modifications to see their effects. This makes the learning experience fun and interactive. The code chapters include the following topics:

Basic Windowing
Brushes
Content concepts
Controls
Layout Elements
Dependency Properties
Routed Events
Creating Custom Elements and Controls

The second half covers WPV via XAML. In some instances the material is similar (windows, properties, controls, etc.). However, he builds on what has been previously learned. He extends the material to cover:

Data Binding
Styles
Templates
Data Views
Animation
Graphical Manipulations

This book is very well written. It's best approached as the author intended, front-to-back, working the examples.

I would recommend this book for anyone interested in WPF of any level. Some topics would be a bit difficult to grasp for novice developers (Routed Events for example). However, any developer could read this book and start on the road to WPF expert.


William Barrett Simms
06 December, 2006


Not a reference guide and not a WPF novel... but the worst technical book I've ever bought...

Despite the positive reviews from members of the WPF team (talking about being biased), this is one of the worst technical books I've bought in a long time. Petzold states that you should see this book as a WPF novel, but to me it's a very boring novel. After reading the first couple of chapters, I just put this book aside: not a single screenshot or image(!) and too much talk about all kinds of brushes in the first chapter. This book is NOT written for modern developers who want to get started with WPF as quick as possible...
[added] For me it was such a releave to read 'WPF unleashed' written by someone who really understands how WPF-concepts should be explained!

D. Olsthoorn
05 December, 2006


Great Introduction to WPF

This book provides a good overview of WPF. The author's writing style is concise and understandable. There are lots of code samples. Be aware that XAML is not introduced until chapter 19 (there are 31 chapters total). Code is used instead of markup for the first 18 chapters. Overall, I highly recommend this book.

G. Kobzeff
18 November, 2006


All that u need to know is here!

Event thought u wont find screenshots in this book, Charles tells why on his intro to the book, the way the book was written is in what u can call a story telling to WPF. I found myself reading it and playing along with it at most time of the day, it is really what u need to know on WPF. It's really good.

G. Corrales
10 November, 2006


Very well written, highly recommended

This is a long book, 30 chapters and about 1000 pages. I'm on chapter 28, but I think I can safely say this is an excellent book on the subject of WPF. After reading this book I now have a much greater understanding of WPF and XAML. One important point though, is that it does NOT cover 3D. This isn't really an issue for me because the applications I'm writing near-term will not be using 3D, but it is an interesting omission.

Robert Hostetter
10 November, 2006


I was not satisfied at all

1. I prefer more screen shots of the sample applications in order to illustrate the lesson.

2. I prefer sample applications to be shorter in order to illustrate the point. I found myself wading through code listings that had very little to do with what I thought the lesson was about.

3. I felt that the explanations spent more time on how the sample application worked as opposed to going over the WPF technology that was supposed to be covered by the sample

4. I felt that the different lessons were not clearly separated.

5. I found the samples that came with WPF beta more helpful than the samples in this book.

6. This does go over the framework for WPF very well but I was not satisfied but the coverage of the GUI capabilities that WPF offers.

There is some good information in the book but I had to dig very deeply for it. Unfortunately I am not satisfied with this book at all.

Programmer
10 November, 2006


Best Avoided

For a book that is about a UI technology you may expect to see maybe a single screen shot. But no. This book is a book about code, code and more code, and not particularly interesting code at that.

If you are interested in getting an idea about WPF is and what it will do for you then go elsewhere. If you are having trouble holding down the book shelf, then get this brick.

Dave A
09 November, 2006


An Amazing WPF Book

The book is pedagogically brilliant: not an easy feat with a platform as vast as WPF. Like all great technology books, he starts with Hello World. But where do you go next after Hello World when trying to tackle WPF? This is where the book excels: Petzold slowly builds from Hello World in such a careful way, layering concepts that elucidate the underlying assumptions of the platform, yet at the same time never pandering to the user and always keeping it exciting. By exciting, I mean that his samples and text show off WPF so that you aren't bored with pedantic samples that don't teach you something -- which, for example, I often find the SDK documentation to be guilty of, when it has a sample in the first place. (Not to diss the SDK: those guys have a lot of APIs to document and they aren't finished yet.)

His samples are more than illustrative: they are downright clever. In Chapter 4, he creates lightweight WordPad with open/save functionality in about 100 lines. In Chapter 5, he creates a File Explorer using a WrapPanel, also in about 100 lines. His code is so tight and self-documenting that I find myself not even needing to run the sample itself to grok what he is trying to convey in the sample.

He never reveals more than he needs to, yet when he explains something, he gives you all the information you need. It is like discovering WPF through his eyes as he unravels it himself. Your guide through WPF is this erudite, scholarly computer programmer. He is very careful with his language, making sure that the reader understand the subtle differences between the sometimes maddening WPF syntax, like the difference between ContentElement and ContentControl. It is like being in the hands of a capable novelist with whom you know trust, like a Charles Dickens. It actually does read like a novel to me, with a narrative arch as it negotiates its methodical way through the WPF jungle of APIs.

Most exciting to me is how in the first few chapters he unpacks some of the core value within WPF around resolution independence and layout. These features of WPF can get lost in the shuffle and often cause more confusion than clarity for people first coming to WPF, thus the common occurance of people resorting to use of the Canvas. He really hammers on how the layout system works, making the assertion at one point that you never need to set a width and height on an element. I am looking forward to similar exegeses on other platform features like databinding and animation. To me, the book is an incredible validation of the platform by one of the most respected Windows programmers out there.

What really keeps this a page turner is the prose. As professor once opined in a writing class years ago, if the voice is interesting, the reader will follow it anywhere. Petzold's voice is indeed interesting. Admist a discussion of the color system in WPF, he throws out, "The interior is filled with Alice Blue, the only color named after a daughter of Teddy Roosevelt." Or, when introducing another very clever sample of the game Jeu de Tacquin (aka 15 puzzle), he provides some historical and cultural context around the the game, not only to computer science, but to the field of mathematics in general, which I knew nothing about. Now I understand why Greg Schechter, WPF Architect, also implemented 15 Puzzle to demonstrate the platform features of WPF.

And then there are the unexpected, understated snarky comments that keep it fresh. For example, after limiting his samples to use no panels whatsoever for the first 4 chapters -- a feat unto itself -- he writes, "I'm sure there are many more marvelous and useful programs we could write with a window that hosts just a single object, but I can't think of any more. And that is why we really need to figure out how to put multiple controls in a window."

Highly recommended both for learning WPF and for a downright good read. I'd happily take this to the beach with me, a claim that I can't make for too many books about programming.



Karsten Januszewski
25 October, 2006


Excellent- WPF inside and out

This is an excellent book. It is all about code, code, more code, and then XAML, XAML, and more XAML. It does an excellent job of showing how all the new presentation features work at a code level.

Although there are a lot of new tools coming out that may keep a person from learning the code level details of WPF, I'd suggest learning the guts of how it works. If you are like me and like knowing how things work at a low level, this book will definitely teach you.

Every chapter is packed full of real world examples. The code that comes with the book is excellent.

If you want know WPF inside and out, you must read this book.


T. Anderson
23 October, 2006


Are You Ready for .NET 3.0 Yet?

Just as I was beginning to get a bit of a handle on .NET Version 2.0, along comes .NET 3.0 as part of the new Windows Vista operating system. To be sure, you can run it on XP with SP2 installed after you have installed .NET Framework 3.0. The book presumes that you have experience with .NET 2.0 and with C#. If you do not, the author recommends you read some of his earlier books.

An interesting point about this book is that you can write WPF programs using either C# or any other programming language that supports .NET (remember this is .NET 3.0). Alternatively Microsoft has created yet another new language called XAML (pronounced to rhyme with camel). The book first presents a number of application examples written in C#. Then at page 457 he basically repeats the whole book but with the examples written in XAML.

My one complaint about this book is the lack of any illustrations. I would have like to have seen some illustrations saying that if you do that, then the screen looks like this. Still at over 1K pages, I wouldn't want a much bigger book. Perhaps doing it in two volumes would be in order.

John Matlock
21 October, 2006


The long awaited Programming Windows, 6th Edition!

This book is the destined to be not only a classic but also the standard for WPF development. It's look and feel is reminiscent of his previous classic: Programming Windows. So much so, in fact, that you could call this his long awaited 6th edition.

With this book you can easily go from not even knowing how to spell WPF to mastering the usage and interactions of it. Split into two sections, Code and Markup, this book covers everything from the manual usage of controls to the automating of animations. Other books should cower in fear as this book takes over the development community.

As with his Programming Windows, 5th edition, this book isn't riddled with meaningless screen shots and it's not going to fall apart as the paperbacks inevitably do. This is a solid hardcover masterpiece. In addition, the source files are readily available from the Microsoft Press website for anyone who wishes to follow along with the book's examples.

David Betz
26 September, 2006


The Definitive WPF Book

I have had this book for about 2 weeks now, as Amazon delivered it to me early before the official release. I am a tech book junkie. I buy a lot of tech books. This is the best programming text I have purchased in the last couple of years. Petzold does a great job explaining WPF from both a nuts & bolts prespective and a big picture perspective.

I purchased two other WPF books over the last few months. This book blows both of them away. It was written using the June CTP of the .Net 3.0 framework, which is supposed to be fairly locked down API-wise. All the code works correctly, which I cannot say about my other two books. In the first 5 pages I learned something new about WPF, even though I have been knee deep in the technology for months. Several things that seemed rather mysterious to me in WPF have become crystal clear because of the explanations in this book.

The first half of the book is all C#. The second half is all XAML, acomplishing the same tasks as the first half. This approach really shows the relationship between XAML code and the resulting objects at runtime.

If you want to start programming in .Net 3.0 using the WPF, buy this book.

Jason Jackson
17 September, 2006


Not what I had hoped for.

I like Mr. Petzold but this is not one of his best works.

The bad:

1) There are no pictures. As someone else pointed out, this is a WPF book! WPF is all about presentation. A picture or two would be nice. Staring at prose text alongside of code listings does nothing for most folks. Especially those that have never worked with WPF before. I happened to read Chris Sells' book first so I was comfortable with visualizing what he was trying to accomplish. But if you don't ALREADY know WPF you will be lost.

2) There are no subchapters. He goes from example to example without even taking a breath. This makes finding any specific piece of information a complete nightmare. There are no visual separators other than a simple blank line.

3) The code samples can't be installed/used as a Limited User. Shame on you Mr. Petzold! You shouldn't be developing as an administrator. You have to be an administrator to install the samples but then it puts them in the administrator's "My Documents" folder! You have to manually copy them to any other user's folder. What a pain. Why even have an installer in the first place? Just give us a zip file and be done with it if you are going to make us copy by hand.

The good:

I like the approach he takes with showing code first and markup later. I like to program mostly in code and like to know what is going on under the covers. XAML is nice enough but things like attached properties don't really make sense without having the code background first.

spongebob
07 September, 2006


Great book

Overall this is a great book (best WPF book so far)
I've read several other Petzold's books, and was looking forward to this one. His writing style makes it a great read.
The code approach (versus xaml) for the first half of the book is excellent.
It would have been 5 stars, except the lack of screenshots and images.

A. Deren
06 September, 2006


Feels like it was rushed to press

I think Mr. Petzold is great, and this book covers many topics well. But it has more mistakes and unresolved issues than I was expecting. Here are 3 examples from the part I'm reading now:

* Page 642: The code doesn't match the description. It talks about a style named "normal" but instead there's a nameless style which hasn't even been covered yet.
* Page 681: He says he's "not exactly sure" why a file is needed, but even I can see it's because he unnecessarily included x:Class in his XAML
* Page 697: It says "At least that's the way ...it's supposed... to work." That's not very comforting!

Other nits:

1. This might sound dumb, but is a single screenshot in 1000 pages too much to ask for? There are a few simple diagrams, but probably less than 10 in the whole book. I was shocked by this considering the subject is WPF! At the beginning of the book he suggests typing the examples at a computer as you read along, but I'd rather not be forced to use my imagination when reading the book away from a computer! Even the author's blog uses screenshots to help explain his posts... why can't the book? A picture is worth a thousand words, Charles!

2. Speaking of the size of the book, it would easily be about 50 pages shorter if every piece of code didn't have the useless 3-line "(c) 2006 by Charles Petzold" comment! Isn't the copyright notice at the beginning of the book enough? Not a big deal but I just find things like this annoying and distracting.

3. The author admits that the book is more a tutorial than a reference and it's not meant to be read out of order. Fair enough. For me, I wish it was a bit more reference-like so I can dive into a topic without having to flip back 12 chapters to see what some "ListColorsEvenElegantlier" project was. And without pictures you can't easily flip back and quickly get the gist.

4. It doesn't cover the more interesting parts of WPF, such as 3D, audio/video or even creating custom controls. Custom panels are covered but he spends a huge amount of time talking about the concepts of a RadialPanel (an idea that seems to have been borrowed from an MS employee's blog). This is more of an exercise in math than WPF, though.

Combining all this with the fact that the book is based on a not-yet-finished version of the technology, I have a hard time recommending this. I'd hold off to see how the other WPF books fare.

Robert
05 September, 2006


Another Petzold Winner!!

This is a classic Petzold work. Elucidated exceptionally well, as are all of his books. If you want to understand WPF, you might want to peruse this one!!

REVIEWER
03 September, 2006


If you only get one WPF book, get this one

Disclaimer - I am one of the senior leads in WPF and helped answer a few questions for Charles (as I do for other writers, press, and developers), and I bought my own copy of this book.

Windows Presentation Foundation sets a new baseline for an application development framework, not only for Windows development, but across the industry. Of note are the integration of UI, documents, and media functionality into a consistent programming model, and the way that this set of functionality interoperates, as well as the expressibility of these concepts in XML (the set of XML tags is referred to as XAML). This is a lot of material to cover, and this book does the best job so far in covering the breadth of knowledge that you will need to develop WPF based applications.

Charles's book reads very naturally (sometimes it felt like I was reading one of the Inside Mac books 18 years ago, which I really enjoyed). Charles provides a good introduction in the first four chapters to get you going, and then takes you through the key built-in layouts (you can also extend by creating your own Panels - chapter 12).

In chapter 8 and 9 he goes through some of the fundamentals that you will need to build your own custom elements/controls, which he tend proceeds to cover in chapters 10, 11, and 12.

Chapter 13 through 16 go through some key controls in a lot of detail.

Chapter 17 takes you into Printing.

In chapter 18 you build a full simple application (a Notepad clone).

Chapter 19 kicks-off a series of chapters that deal with XAML.

Chapter 22 deals with some key concepts, such as running WPF applications/content in a browser, and navigation applications.

Databinding is covered in chapter 23, followed by Styles and Templates (a great way to sequence these concepts, building on previous concepts).

Chapter 26 covers concepts related to a key real world scenario - Data Entry and Data Views.

Chapter 27 through 31 deal with my favorite topics - Graphics and Animations.

Overall a great book, and a good read. Essential for learning WPF at your own pace and getting exposed to the breadth of functionality.

Some of the things that he does not cover: 3D graphics, Media (audio/video), XPS, and Typography functionality.

Pablo F. Fernicola
31 August, 2006