I have a listview in details mode which I am using to display the contents of a datatable. At the moment I am setting the ListView ItemsSource in the vb code after populating the table like this:
VB Code:
Class Window1 Dim oTable As New DataTable Private Sub Window1_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded GetData() 'Sub to populate datatable ListView1.ItemsSource = oTable.DefaultView 'assign the datatable to the listview itemssource End Sub
This works fine but I was wondering if anyone can tell me how I can assign the listview ItemsSource to the datatable in the XAML?




Reply With Quote