I have searched many topics and can\'t find an answer on using the WPF DataGrid to list file name contents from a directory. I am able to output the contents in a <
DataGrid
string [] fileEntries = Directory.GetFiles(targetDirectory); List fileList = new List(); foreach (string file in fileEntries) { fileList.Add(new FileInfo(file)); } datagrid.ItemsSource = fileList;