string ProImgPath = ProcessPath + name + ".png";//要保存的图片的地址,包含文件名 BitmapSource BS = (BitmapSource)ImgPro.Source; PngBitmapEncoder PBE = new PngBitmapEncoder(); PBE.Frames.Add(BitmapFrame.Create(BS)); using (Stream stream = File.Create(ProImgPath)) { PBE.Save(stream); }