Data Binding in WPF Applications

Just as with Windows Forms applications, Visual Studio supports drag-and-drop data binding with WPF projects. The process is identical to the one we just covered for binding Windows Forms controls; we first need a data source added to our project. To change things up a bit, let’s quickly build out a form that shows purchase orders and their detail line items.

First, create a new WPF project. Refer to Chapter 21, “Building WPF Applications,” if you want to first refresh your knowledge of the WPF project type and its designers/editors. Add the data sources in the same fashion as we did previously by using the Data Sources Wizard. This time, instead of employee data, let’s focus on purchase order data. From the ...

Get Microsoft Visual Studio 2015 Unleashed, Third 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.