O'Reilly logo

Learning C# 3.0 by Brian MacDonald, Jesse Liberty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 19. Windows Presentation Foundation

The Windows Forms techniques you learning in Chapter 18 are great, and they represent a major improvement in user experience over the console applications you’ve used for most of this book. Time and familiarity have a way of changing expectations, though, and Windows Forms have been around for a very long time in programming years. As rival operating environments grow and mature, and people become accustomed to sophisticated interface design on the Web, users’ expectations for interfaces have changed. Although Windows Forms are powerful, they don’t leave a whole lot of flexibility for designers to show off, and those designers who do try need to be programmers as well if they want to get the most out of Windows Forms. Microsoft has responded to those concerns with the Windows Presentation Foundation (WPF).

The purpose of WPF is to provide a solution that’s similar to the Windows Forms techniques you just learned, but provides greater flexibility of design. In Windows Forms, you used the visual designer to create the layout of the form, but you kept the code in a separate part of the file. WPF keeps the idea of separating the presentation (the look of the form) from the implementation (the event handler code), but it gives you direct control over the presentation. Instead of allowing access to only the Design view of your form in a visual interface, WPF represents the design in a form of XML, specifically created for WPF. This form of XML ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required