* Reset branch for WPF changes * Convert BMP to PNG; fix link-out-of-scope err * Add snippets for WPF... 6794 files!!!! * Add missing snippets * update file updated between migration * Fix paths to include * update breadcrumb and toc * fix index links * fix index links * fix index links * fix markdown
1.7 KiB
title, ms.date, helpviewer_keywords, ms.assetid
| title | ms.date | helpviewer_keywords | ms.assetid | ||
|---|---|---|---|---|---|
| How to: Display ListView Contents by Using a GridView | 03/30/2017 |
|
5bc1e767-ab46-4f14-bd41-3d5d39e1d000 |
How to: Display ListView Contents by Using a GridView
This example shows how to define a xref:System.Windows.Controls.GridView view mode for a xref:System.Windows.Controls.ListView control.
Example
You can define the view mode of a xref:System.Windows.Controls.GridView by specifying xref:System.Windows.Controls.GridViewColumn objects. The following example shows how to define xref:System.Windows.Controls.GridViewColumn objects that bind to the data content that is specified for the xref:System.Windows.Controls.ListView control. This xref:System.Windows.Controls.GridView example specifies three xref:System.Windows.Controls.GridViewColumn objects that map to the FirstName, LastName, and EmployeeNumber fields of the EmployeeInfoDataSource that is set as the xref:System.Windows.Controls.ItemsControl.ItemsSource%2A of the xref:System.Windows.Controls.ListView control.
[!code-xamlListViewCode#ListViewEmployee]
The following illustration shows how this example appears.
