Xamarin图片缓存 Image cache

XAML


	
		
	

C#

webImage.Source = new UriImageSource {
    Uri = new Uri("http://xamarin.com/content/images/pages/forms/example-app.png"),
    CachingEnabled = true,
    CacheValidity = new TimeSpan(5,0,0,0)
};

CacheValidity:缓存天数
CachingEnabled:是否缓存,默认为false,赋值为true即可缓存

你可能感兴趣的:(Xamarin)