通过HTTP获取图像而不进行缓存

时间:2019-06-07 16:00:15

标签: c# wpf

如果我在服务器上更改图片,则不会重新加载图片。似乎使用了缓存版本。是否可以每次下载或刷新缓存?

Username.Content = "Hello, " +  Properties.Settings.Default.Firstname.ToString();
var pic = lo.pic(Properties.Settings.Default.Username.ToString());
var brush = new ImageBrush();
brush.ImageSource = new BitmapImage(new Uri("http://website/pics/default.jpg"));
try
{
brush.ImageSource = new BitmapImage(new Uri(pic));
}
catch 
{
}

profilepic.Background = brush;

0 个答案:

没有答案