This blog has been migrated to the new blog site:
http://www.michaelsnow.com/2010/05/07/silverlight-tip-of-the-day-16-working-with-ignoreimagecache/
By default Silverlight will not download an image more than once if is contained within the image cache
Yeah and what you do is waiting for everybody to have downloaded the new images then you remove the IgnoreImageCache so it doesn't send the image everytime ?
Yes. For example, you can program your app to have a "refresh" button that refershes the images only when the button is pressed. Or something similiar...
Isn't this why browser caches are supposed to use things like timestamps, serial numbers, and expiration dates? Are you saying those mechanisms are ineffective or not used when downloading images with SL?
I believe they are effective but if this is useful if your app needs to update the images before the expiration date occurs.
Is this SL3? You have it tagged with both, but I've never noticed this in SL2.
Sorry, yes this is just SL3. I didn't mean to tag Sl2.
So, what other image options are there now? I'm the architect on Inkubook.com, and we do a LOT of image manipulation all things considered. I haven't, unfortunately, taken the time to dig into the new parts yet, mostly just checking for upgrade compatability with the current site.
I'll have to look into it myself. This is the only new one I am aware of. Thanks.
Most Recent Posts: Silverlight Tip of the Day #106 - Setting Default Browser from within VS Silverlight
The purpose of this post is to create an outline summary all the blogs from my Silverlight Tips of the
Бюллетень Сильверлайтера. Выпуск №2. 9 Мая 2009 года. Здравствуйте, уважаемые сильверлайтеры! Вот и прошёл
Thank you for submitting this cool story - Trackback from NewsPeeps
Pingback from Silverlight Tip of the Day #102 - Bypassing the Image Cache … Silverlight Blog
The MSDN topic at msdn.microsoft.com/.../system.windows.media.imaging.bitmapcreateoptions(VS.95).aspx has this description of the IgnoreImageCache parameter of the BitmapCreateOptions enum:
"Loads images without using an existing image cache. This option should only be selected when images in a cache need to be refreshed.... When IgnoreImageCache is selected, any existing entries in the image cache are replaced, even if they share the same URI."
I can't seem to reconcile this description. It seems to contradict itself, and your tip.
Can you tell me, if IgnoreImageCache is set, is the image contained in the BitmapImage or BitmapSource object in the image cache, or outside of the image cache? If it's outside, why would "existing entries in the image cache are replaced"?
Thanks for any help.
I am developing a silverlight application. In this application, the silverLight control send request to WCF to update the image on server, I would like to update the image display on client browser. I attach an event ChartCreateCompleted and it does get called. however, the silver control still display image which come from the previous run. I wish anyone can help me out. thank you very much.
the following are the codes I have
private void ChartCreateCompleted(object sender, chartsvc.updateChartCompletedEventArgs e)
{
int reslt = e.Result;
if (reslt == 0) //successs
#region Commented
DefectsInfo.UpdateLayout(); //DefectsInfo is a silverlight window panel
Uri uri = new Uri("blank.png", UriKind.Relative);
ImageSource img = new System.Windows.Media.Imaging.BitmapImage(uri);
columnChart.SetValue(Image.SourceProperty, img); //columnChart is an Image Control on this window panel
columnChart.Source = img;
System.Threading.Thread.Sleep(500);
uri = new Uri("juncheng_dell/.../columnChart.png", UriKind.Absolute);
img = new System.Windows.Media.Imaging.BitmapImage(uri);
columnChart.SetValue(Image.SourceProperty, img);
#endregion
}
else //error
//Uri uri = new Uri("Blank.png", UriKind.Relative);
//ImageSource img = new System.Windows.Media.Imaging.BitmapImage(uri);
//columnChart.SetValue(Image.SourceProperty, img);