One of the new features in WPF 4 is the DataGrid control. In earlier versions of WPF, developers could only use the DataGrid present in the WPF Toolkit that was available at CodePlex. But now, with WPF 4, developers can make use of DataGrid directly without needing to install the WPF Toolkit. The new DataGrid control has many rich features to offer, especially that of data binding. If you have used Windows Forms (WinForms) and ASP.NET, you surely know the advantages of displaying many rows of data in a grid-like structure. The DataGrid control is present in the Toolbox, as shown in Figure 1. Figure 1 Some of the properties of this control are shown in Figure 2. Figure 2 Let us now see how to use this control.
The outcome of this is as follows: Figure 4 Conclusion: This article covered how to use XML binding with a WPF data grid and also showed how to style the data grid.