merge main branch

This commit is contained in:
CXWTool Service Account
2022-02-05 06:00:54 +00:00
2 changed files with 18 additions and 2 deletions
@@ -13,6 +13,9 @@ ms.assetid: 989e12b0-260e-4570-95c6-489284003ce2
# ListView Overview
The <xref:System.Windows.Controls.ListView> control provides the infrastructure to display a set of data items in different layouts or views. For example, a user may want to display data items in a table and also to sort its columns.
> [!NOTE]
> The types referenced in this article are available in the [Code reference](#code-reference) section.
<a name="WhatisaListView"></a>
## What Is a ListView?
The <xref:System.Windows.Controls.ListView> control is an <xref:System.Windows.Controls.ItemsControl> that is derived from <xref:System.Windows.Controls.ListBox>. Typically, its items are members of a data collection and are represented as <xref:System.Windows.Controls.ListViewItem> objects. A <xref:System.Windows.Controls.ListViewItem> is a <xref:System.Windows.Controls.ContentControl> and can contain only a single child element. However, that child element can be any visual element.
@@ -75,6 +78,19 @@ The <xref:System.Windows.Controls.ListView> control provides the infrastructure
## Creating a Custom View Mode
Customized views like <xref:System.Windows.Controls.GridView> are derived from the <xref:System.Windows.Controls.ViewBase> abstract class, which provides the tools to display data items that are represented as <xref:System.Windows.Controls.ListViewItem> objects.
## Code reference
The following objects are referenced in this article:
- `EmployeeInfoDataSource` data collection. If you're using Visual Basic .NET, the `Window` element is declared slightly different from what you see in the example code:
:::code language="xaml" source="~/samples/snippets/csharp/VS_Snippets_Wpf/ListViewCode/CSharp/Window1.xaml" range="1-8" highlight="4,6-8" :::
- `EmployeeInfo` class, which is used as the type for the `EmployeeInfoDataSource` data collection.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Wpf/ListViewCode/CSharp/Window1.xaml.cs" range="66-96" :::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Wpf/ListViewCode/visualbasic/window1.xaml.vb" range="63-100" :::
## See also
- <xref:System.Windows.Controls.GridView>
+1 -1
View File
@@ -360,7 +360,7 @@ You may have noticed that the above example uses a template. In fact, the data w
## Data templating
Without the use of data templates, our app UI in the [What is data binding](#what-is-data-binding) section would look like the following.
Without the use of data templates, our app UI in the [Example of data binding](#example-of-data-binding) section would look like the following:
:::image type="content" source="./media/index/demo-no-template.png" alt-text="Data Binding Demo without Data Templates":::