Created
May 29, 2013 05:29
-
-
Save RockyMyx/5668163 to your computer and use it in GitHub Desktop.
C#: Read-Zip-In-Silverlight
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var client = new WebClient(); | |
client.OpenReadCompleted += (s, ex) => | |
{ | |
var info = new StreamResourceInfo(ex.Result, null); | |
var bitmapInfo = Application.GetResourceStream(info, new Uri("1.png", UriKind.RelativeOrAbsolute)); | |
var bitmap = new BitmapImage(); | |
bitmap.SetSource(bitmapInfo.Stream); | |
this.image1.Source = bitmap; | |
}; | |
var url = Application.Current.Host.Source.AbsolutePath.Replace("SilverlightAis.xap", "1.zip"); | |
client.OpenReadAsync(new Uri(url, UriKind.Relative)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment