problem in loading image packed in zip file.
public Page()
{
InitializeComponent();
webClient.OpenReadCompleted += new OpenReadCompletedEventHandler(webClient_OpenReadCompleted);
webClient.OpenReadAsync(new Uri("../Graphics.zip", UriKind.Relative));
}
void webClient_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
{
StreamResourceInfo sri = new StreamResourceInfo(e.Result, null);
StreamResourceInfo png = Application.GetResourceStream(sri, new Uri("Graphics/Characters/Actor1.png", UriKind.Relative));
BitmapImage bmp = new BitmapImage();
bmp.SetSource(png.Stream);
fsa.ImageSource = bmp;
fsa.UpdateLayout();
}
here`re all codes.i download a zip,then load a picture packed inside it.these function successful executed,and i got a white board again.
but after i refresh my browser,the picture appeard.
why i have to refresh the browser?