O'Reilly logo

Professional Visual Studio® 2010 by Chris Anderson, Michael Minutillo, David Gardner, Nick Randolph

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 18. Windows Presentation Foundation (WPF)

WHAT'S IN THIS CHAPTER?

  • Learning the basics of XAML

  • Creating a WPF application

  • Styling your WPF application

  • Hosting WPF content in a Windows Forms project

  • Hosting Windows Forms Content in a WPF project

  • Using the WPF Visualizer

When starting a new Windows client application in Visual Studio you have two major technologies to choose from — a standard Windows Forms–based application, or a Windows Presentation Foundation (WPF)–based application. Both are essentially a different API for managing the presentation layer for your application. WPF is extremely powerful and flexible, and was designed to overcome many of the shortcomings and limitations of Windows Forms. In many ways you could consider WPF a successor to Windows Forms. However, WPF's power and flexibility comes with a price in the form of a rather steep learning curve because it does things quite differently than Windows Forms.

This chapter guides you through the process of creating a basic WPF application in Visual Studio 2010. It's beyond the scope of this book to cover the WPF framework in any great detail — it would take an entire book on its own to do so. Instead, what you will see is an overview of Visual Studio 2010's capabilities to help you rapidly build user interfaces using XAML.

WHAT IS WPF?

Windows Presentation Foundation is a presentation framework for Windows. But what makes WPF unique, and why should you consider using it over Windows Forms? Whereas Windows Forms uses ...

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