private void CreateList() { try { var stagedFiles = DirectoryStructure.GetStagedFiles(); lblStagedFiles.Text = $"Currently you have {stagedFiles.Count()} files to process."; listView1.Columns.Clear(); listView1.Items.Clear(); listView1.View = View.Details; //listView1.GridLines = true; listView1.FullRowSelect = true; listView1.Sort(); //listView1.CheckBoxes = true; //Add column header // listView1.Items.AddRange(stagedFiles); foreach (var itm in stagedFiles.Select(item => new ListViewItem(item))) { listView1.Items.Add(Path.GetFileName(itm.Text)); } if (stagedFiles.Length > 0) { listView1.Columns.Add("File Name", 300); listView1.Columns[0].AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); } } catch (Exception exp) { log.Error(exp); MessageBox.Show(exp.Message); } }