MENU

閉じる

Controlling Image Caching in Xamarin.Forms & .NET MAUI

9,837 view
Did you know that Xamarin.Forms & .NET MAUI automatically download and caches images for a full 24 hours?!?! There are awesome libraries out there for Images with Xamarin.Forms such as FFImageLoading and Nuke, but the built -in Image is super powerful and you have control over just how long images are cached. Today, I walk through how to setup and control Images in Xamarin.Forms and .NET MAUI and ensure that images get cached for the correct amount of time.


Full Xamarin Beginner's Playlist - https://www.youtube.com/playlist?list=PLwOF5UVsZWUiHY1CkRVjYJ6dm0iCvAlfw

Links:
👩‍💻 Source Code: https://github.com/jamesmontemagno/MyCoffeeApp?WT.mc_id=friends-0000-jamont
Docs -
https://docs.microsoft.com/xamarin/xamarin-forms/user-interface/images?tabs=windows&WT.mc_id=friends-0000-jamont#download-images
FFImageLoading - https://github.com/luberda-molinet/FFImageLoading?WT.mc_id=friends-0000-jamont
Nuke - https://github.com/roubachof/Xamarin.Forms.Nuke?WT.mc_id=friends-0000-jamont


👕 Buy some swag! - https://jamesmontemagno.myspreadshop.com/
☕️ Buy me a coffee - https://www.buymeacoffee.com/jamesmontemagno

Follow:
👨‍💻 GitHub: https://github.com/jamesmontemagno
🦜 Twitter: https://twitter.com/jamesmontemagno
🔴 Twitch: https://twitch.tv/jamesmontemagno
📄 Website: https://www.montemagno.com
📰 Newsletter: https://newsletter.montemagno.com/

Disclaimer: This channel, videos, and streams are created in my spare time and are a product of me... James Montemagno! They are NOT officially affiliated or endorsed by Microsoft (my employer) in any way. Opinions and views are my own.

Chapters:
00:00 - Intro and scenario for image caching
02:50 - Displaying an Image in Xamarin.Forms and .NET MAUI
03:45 - Controlling cache time for Image.Source
07:15 - Manually refreshing image cache
10:40 - Wrap-up

What is on my hat? It is the CLE clothing logo because I am from Cleveland! Checkout their awesome CLE merch: https://cleclothingco.myshopify.com/

What is that art on my wall? It is an original piece from the French street artist Gregos of La Butte Montmartre: https://www.instagram.com/p/BceZ1oNHiQx/

My Setup:
🎙 Blue Spark Microphone - https://amzn.to/3qgtYkq
🎙 Blue Pop Filter - https://amzn.to/3jEWM3r
🤳 Rode Microphone Arm - https://amzn.to/2Z68AlE
🎧 Sony MDR7306 Headphones - https://amzn.to/372jxta
📲 Stream Deck - https://amzn.to/373Uk1n
📹 Elgato Cam Link - https://amzn.to/3a9eGbh
📷 GoPro Hero - https://amzn.to/374lm90
🖱 MX Master 2S Mouse - https://amzn.to/3d7J2gj
⌨️ Tecware Phantom Keyboard - https://amzn.to/3aUP4y9

#dotnetmaui #xamarinforms #imagecaching