Layout

Half the battle in any user interface design is organizing the content in a way that's attractive, practical, and flexible. But the real challenge is making sure that your layout can adapt itself gracefully to different window sizes.

In WPF, you shape layout using different containers. Each container has its own layout logic—some stack elements, others arrange them in a grid of invisible cells, and so on. If you've programmed with Windows Forms, you'll be surprised to find that coordinate-based layout is strongly discouraged in WPF. Instead, the emphasis is on creating more flexible layouts that can adapt to changing content, different languages, and a variety of window sizes. For most developers moving to WPF, the new layout system is ...

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.