ListView myListView = new ListView(); myListView.Items.Add("Item1"); myListView.Items.Add("Item2"); myListView.Items.Add("Item3");
ListIn both examples, we create an instance of the ListView class and add items to it. In the first example, we add items dynamically, while in the second example, we bind the ListView to a data source using the ItemsSource property. The package library for the global::Windows.UI.Xaml.Controls.ListView is Windows.UI.Xaml.Controls.items = new List {"Item1", "Item2", "Item3"}; ListView myListView = new ListView(); myListView.ItemsSource = items;