Content

In the previous chapter you explored the WPF layout system, which lets you arrange a window by placing elements into specialized layout containers. With this system, even a simple window breaks down to a nested series of Grid, StackPanel, and DockPanel containers. Dig deep enough and you'll eventually find the visible elements (widgets such as buttons, labels, and text boxes) inside the various containers.

However, the layout containers aren't the only example of nested elements. In fact, WPF is designed with a new content model that lets you place elements inside other elements that are otherwise ordinary. Using this technique, you can take many simple controls—such as buttons—and place pictures, vector shapes, and even layout containers ...

Get Pro WPF in C# 2008: Windows Presentation Foundation with .NET 3.5, Second Edition 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.