||Tim Sneath wrote:
To be fair, the goal of the tutorial is not to lead you through the steps to produce Outlook in the minimum number of pages, but rather to provide a comprehensive learning guide to our designer and developer tools while building a fun and useful sample.
(And that's not to say that building an Outlook-like interface is a trivial task, either - particularly if the controls are real, working, data-bound controls. I'm sure it was significantly more work for the Outlook developers to build this code in Win32.)
I suppose the logic here is that "in the era of 1,000+ page programming books, what's another 90 pages?"
Out of curiousity, how hard is it to write your own WPF controls anyway?
The first thing to learn, is that you hardly ever need to write your own controls. Templates, styles, attached properties and markup extensions can all be used in creative ways that replace many of the reasons you'd create a custom control in other frameworks,
such as WinForms. Like I said, I've made use of ListView and GridView several times for things that would have required a DataGrid in WinForms simply by applying a little bit of styling and templating. It's really quite amazing what you can accomplish here
with out creating a custom control.
If you do need to create a custom control, it's extremely easy. Much easier than in WinForms where control compisiting requires a lot of grunt work and painting of controls is tedious and difficult. In WPF, your control class cares only about functionality,
since the controls are "lookless". That's extremely easy to do. Then you provide a default template for the control, which can easily be crafted by compositing and using builtin presentation features.
There's a learning curve, and there's still some areas I think need some help, but in the general cases this stuff is really quite nice.