Windows Presentation Foundation (WPF) is Microsoft's next-generation presentation platform. WPF is built into Windows Vista and also runs on Windows XP and Windows Server 2003. WPF allows rich client applications to take full advantage of the graphical capabilities of a modern PC. Its powerful and flexible programming model integrates support for flexible layout, high-quality text, resolution-independent graphics, animation, video and 3D. While it is designed to exploit the full capabilities of today's high-performance graphics cards, it offers high-level abstractions that offer great power to the developer for less development effort than ever before. This course will introduce practicing .NET developers to the new programming models and UI features introduced by WPF.
Ian is an independent consultant, developer, speaker, and author. He has written books on Windows Presentation Foundation, Windows Forms, and Visual Studio. He lives in London but can often be found on various developer mailing lists and newsgroups, where a popular sport is to see who can get him to write the longest email in reply to the shortest possible question.
Section Introduction Transcripts
Section Introduction Transcripts
Introduction to WPF Ian Griffiths: Hello. I'm Ian Griffiths. Windows Presentation Foundation is a powerful framework for building Windows applications. This WPF Fundamentals course will explain the features you need to understand to build WPF applications. WPF has a steep learning curve and one of the greatest challenges for anyone learning the technology is that the individual pieces only make sense once you've understood how they fit into the whole framework. It can seem like you need to understand all of WPF in order to understand any of it. So we will start with a quick tour around the most important features of WPF before getting down to details and the rest of the course. In particular we'll look at why WPF exists at all. To understand the design decisions Microsoft made, it helps to know what problems they were trying to solve. We'll look at XAML, the extensible application mark-up language, which is the language in which we usually construct WPF user interfaces. We'll look at the main features of the programming model in order to get a good overview of what it's like to create WPF programs. And we'll look at the two tools to support interactive layouts and design of WPF user interfaces, visual studio and expression Blend.
Controls In this section, we'll look at the building blocks of any wpf application controls. In particular we will focus on what makes wpf versions of some common controls different.
Layout In the previous section we looked at the building blocks of a WPF application controls. In this section we look at the layout mechanisms to let you determine where the controls appear. So we'll look at the common layout properties available throughout WPF. We'll also look at the various panel types to implement different layout strategies. We'll look at how the ScrollViewer enables you to display arbitrarily the size ranges of content. And we'll look at navigation which let's you build an application structure beyond the scope of a single page.
Graphics We'll now look at WPF's graphics features. We'll start with the review of WPF's graphics architecture. We'll then look at the vector or into drawing primitives WPF offers. We'll also look at the support for working with bitmaps and videos. We'll explore the transformations that enable WPF's resolution independence and we'll look at the effects that can be applied to content to revive more interesting visuals.
Data Binding Any meaningful application will need to present information to the user. So, we will now look at how to work with data in WPF Applications. Data binding is one of the most important services offered by WPF. Applications use it more or less anytime they want to present data on the screen regardless of whether that data came from a database, a service or somewhere else. So we'll look at the binding for services. We'll also look at data contexts which enable a set of elements to bind to a common source. We'll look at data templates, a very powerful feature for presenting information items. We'll explore how to work with data sources that contain multiple items and we'll see how data binding can work with XML data.
Core Types Now that we've spent some time looking at various aspects of WPF's programming model we're going to look at some of the core base types in more detail. We've already seen quite a lot of these in passing but we're now going to put them all into context. We'll look at dependency object which is the base class of almost all the types you work with in WPF. Then we'll examine the classes that underpin the visual tree and text object model, visual UI element and content element. Then we'll look at the types that extend these framework features, framework elements, and framework content elements. And finally we'll look at freezable which is the base type of brush, geometry and a lot of the other nil related types.
Templates In WPF, the control's appearance is usually defined by its templates. We'll look at this mechanism in more detail now. We'll look at the customization continuum idea which informs the design of much of WPF and templates in particular. We'll review how so called lookless controls rely on templates. We'll look in more detail of the control templates and template binding mechanisms. We'll see how triggers operate in control templates. We'll examine the implied contract that exists between a control and its template, and we'll see how templates expand elements in the logical tree to populate the visual tree.
Resources In this section, we'll look at WPF resource handling service and the related support for internationalization. We'll start by looking at the resource hierarchy that supports object resources in memory. Then, we'll examine how binary resources are handled in WPF and finally, we'll see how these 2 resource handling systems come together to support internationalized applications.
Text In this section we'll look at the WPF text formatting and layout services. We'll look at the text rendering features that are available throughout WPF where ever you use text. We'll also look at the text flow layout services which can present larger volumes of text making best use of the available space and optimizing for readability. We'll look at the text object model that WPF provides for structuring and formatting text. And we'll look at how this object model relates to the text editing controls.