I'm building a User Control with ListView of n columns, so I have a List of Lists:
C#:
public List<List<string>> ListItems { get; set; }
var itemList = new List<string>();
itemList.Add("1");
itemList.Add("John Doe");
ListItems.Add(itemList);
itemList = new List<string>();
itemList.Add("2");
itemList.Add("Jane Doe");
ListItems.Add(itemList);
itemList = new List<string>();
itemList.Add("3");
itemList.Add("Sammy Doe");
ListItems.Add(itemList);
XAML:
<ListView Name="lvwLista" Grid.Row="1" SelectionMode="Single" ScrollViewer.IsDeferredScrollingEnabled="False" ItemsSource="{Binding ListItems, ElementName=ucListaCompletarControl}">
<ListView.ItemTemplate>
<DataTemplate>
<Label Content="{Binding Path=.}"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
But I don't Know how to binding the List<List<string>> to ListView.
Thanks.