O'Reilly logo

Pro WPF in C# 2008: Windows Presentation Foundation with .NET 3.5, Second Edition by Matthew MacDonald

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

Understanding Layout in WPF

The WPF layout model represents a dramatic shift in the way Windows developers approach user interfaces. In order to understand the new WPF layout model, it helps to take a look at what's come before.

In .NET 1.x, Windows Forms provided a fairly primitive layout system. Controls were fixed in place using hard-coded coordinates. The only saving grace was anchoring and docking—two features that allowed controls to move or resize themselves along with their container. Anchoring and docking were great for creating simple resizable windows—for example, keeping OK and Cancel buttons stuck to the bottom-right corner of a window, or allowing a TreeView to expand to fill an entire form—but they couldn't handle serious layout ...

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