WPF中怎么遍历文件夹中的所有图片然后显示出来

解决方案 »

  1.   


    public static void DeleteFolder(string dir)
            {
                if (System.IO.Directory.Exists(dir))    //如果存在这个文件夹删除之   
                {
                    foreach (string d in System.IO.Directory.GetFileSystemEntries(dir))
                    {
                        if (System.IO.File.Exists(d))
                            System.IO.File.Delete(d);     //直接删除其中的文件   
                        else
                            DeleteFolder(d);        //递归删除子文件夹   
                    }
                    System.IO.Directory.Delete(dir);     //删除已空文件夹   
                }
            }
      

  2.   

    你是要显示在什么里面,Wpf的Listview?
      

  3.   

    好像是Bitmap的ImageSource属性设置。
      

  4.   

    http://nonocast.cn/?s=Gallery