Chapter 2. WPF in Visual Studio

Visual Studio provides everything you need to build WPF applications. It has a WYSIWYG ("what you see is what you get") Window Designer that lets you create a XAML (Extensible Markup Language) interface by dragging controls onto a window. (If you skipped Chapter 1 and want more detail about what XAML, see the section "What Is XAML?" in Chapter 1. Its Code Editors let you write C# or Visual Basic code to sit behind the user interface (UI). It can also run the WPF application that you're building so you can see it in action.

This chapter explains how you can use Visual Studio to build WPF applications. It does not explain how to use Visual Studio in its entirety. Visual Studio is a huge application with lots of powerful features for writing applications in C#, Visual Basic, Visual C++, and other languages, and this book only covers the bare minimum necessary to use Visual Studio to build WPF applications. For more information on programming in those other languages, see a book that covers those topics.

Note

For more details on Visual Basic programming, see my book Visual Basic 2010 Programmer's Reference (Rod Stephens, Wiley, 2010).

Note

If you have lots of previous experience with Visual Studio, possibly building Windows Forms applications, then most of this material will be familiar and easy to understand. If you're comfortable building forms, setting control properties, and performing other basic Visual Studio chores, then you may want to skim much of ...

Get WPF Programmer's Reference: Windows Presentation Foundation with C# 2010 and .NET 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.