6. Data

WINDOWS PRESENTATION FOUNDATION differs from many UI frameworks in how it treats data. The old User32-based UI model was fairly data-agnostic. Controls contained data, and displaying something required transforming the data into something the control understood. Other frameworks, like Java’s Swing library, had a strict data model that required separation between data and control. In WPF we wanted a separation between data and UI to be possible but not required.

Although WPF enables the mixing of data and UI, generally data-driven models provide more flexibility and ability to integrate the work of both developers and designers.

Data Principles

Most applications are built to display or create some type of data. Whether that data is a document, ...

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.