Charles Petzold



Writing on the Installment Plan

January 3, 2006
New York City

When I was a kid, I imagined that when writers finished their books, they would stuff the whole typed manuscript into a manilla envelope and send it to the publisher. There may be some books still written that way, but publishers of computer books want the chapters submitted as soon as they are completed.

By getting chapters early, publishers are assured that the author is actually getting some work done, and the early chapters can begin their process through the editing pipeline. As an author, however, I prefer holding on to chapters as long as I can. It's much easier ripping chapters apart and reassembling them when they're still solely in my possession.

Today I submitted the first batch of chapters of my Windows Presentation Foundation book to my publisher, totalling about 150 book pages. I had hoped for more progress at this point, but it was not to be. The chapters (which average just under 20 book pages apiece) are:

  1. The Application and the Window
  2. Basic Brushes [ solid and gradients ]
  3. The Concept of Content [ demonstrates Image, Ellipse, TextBlock, Frame, and OnRender ]
  4. Buttons and Other Controls [ Label, TextBox, RichTextBox ]
  5. Stack and Wrap [ StackPanel and WrapPanel, obviously ]
  6. The Dock and the Grid
  7. Canvas
  8. Dependency Properties

These chapters make up about the first half of Part 1 of the book, which is strictly focused on C# coding. I'm currently seeing three parts to the book. The second will be very XAML oriented, and will include data-binding and styling. The third part is for graphics, including animation, 3D, and documents.

With this book I've found myself being more flexible then I've been in the past about introducing topics early before I can cover them completely. For example, the first chapter has some user-input event handling (clicking windows to display a message box, and overriding OnTextInput to construct the window's Title), Chapter 2 uses DispatcherTimer to animate a radial gradient brush, Chapter 4 intercepts Ctrl-O and Ctrl-S in a RichTextBox to display File Open and File Save dialog boxes, and Chapter 7 has a WPF rendition of Jeu de Tacquin (a.k.a., the 14-15 puzzle).