如何读取ZIP包里的二级或更深层文件夹中的资源?
WebClient wc = new WebClient(); wc.OpenReadCompleted += new OpenReadCompletedEventHandler(wc_OpenReadCompleted); wc.DownloadProgressChanged += new DownloadProgressChangedEventHandler(wc_DownloadProgressChanged); wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted); wc.OpenReadAsync(new Uri(@"demo.zip", UriKind.Relative), "demo.jpg");void wc_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) { String sURI = (e.UserState as String); StreamResourceInfo sri = new StreamResourceInfo(e.Result, null); StreamResourceInfo imageStream = Application.GetResourceStream(sri, new Uri(sURI, UriKind.Relative)); BitmapImage imgsrc = new BitmapImage(); imgsrc.SetSource(imageStream.Stream); T_Image.Source = imgsrc; }