wpf_图片浏览器(2)
MSDN上的教程里是一个这样的例子
private ArrayList GetImageFileInfo() { ArrayList imageFiles = new ArrayList(); string[] files; //Get directory path of myData (down two directory levels) string currDir = Directory.GetCurrentDirectory(); string temp = currDir + "\\..\\..\\myData"; files = Directory.GetFiles(temp, "*.jpg"); foreach (string image in files) { FileInfo info = new FileInfo(image); imageFiles.Add(info); } //imageFiles.Sort(); return imageFiles; }