public static void PopulateWithSearchResult(ListView listView, TextBlock textBlock) { var FolderContent = new FolderContent(); var items = new List <FileProperties>(); List <string> FolderTag = SearchModel.GetAllSearchedFiles(); foreach (var file in FolderTag) { FileInfo _dirinfo = new FileInfo(file); items.Add(new FileProperties() { CheckboxName = _dirinfo.FullName, FileName = _dirinfo.Name, CreatedTime = _dirinfo.CreationTime, Size = System.String.Format("{0}KB", _dirinfo.Length / 1024) }); } listView.ItemsSource = items; textBlock.Text = $"We found {items.Count} files. See Below"; }