4. Layout

CHAPTER 3 GAVE an overview of the control library in Windows Presentation Foundation that can be used to build UIs for applications. A real application needs more than one control, which means we have to figure out how to position all of those controls.

Although controls have been part of every major UI framework for the past 15 years, the notion of layout being a core part of a UI framework has lagged behind. For Win32 developers, layout is built on a simple 2D coordinate system that starts in the upper left corner of each window. On the other hand, HTML authors have been able to use a combination of flowing text, tables, and absolute positioning to create displays.

In WPF, layout is a pervasive concept that is deeply integrated into ...

Get Essential Windows Presentation Foundation 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.