AsyncImageLoader.Avalonia
3.0.0-avalonia11
See the version list below for details.
dotnet add package AsyncImageLoader.Avalonia --version 3.0.0-avalonia11
NuGet\Install-Package AsyncImageLoader.Avalonia -Version 3.0.0-avalonia11
<PackageReference Include="AsyncImageLoader.Avalonia" Version="3.0.0-avalonia11" />
paket add AsyncImageLoader.Avalonia --version 3.0.0-avalonia11
#r "nuget: AsyncImageLoader.Avalonia, 3.0.0-avalonia11"
// Install AsyncImageLoader.Avalonia as a Cake Addin #addin nuget:?package=AsyncImageLoader.Avalonia&version=3.0.0-avalonia11&prerelease // Install AsyncImageLoader.Avalonia as a Cake Tool #tool nuget:?package=AsyncImageLoader.Avalonia&version=3.0.0-avalonia11&prerelease
AsyncImageLoader.Avalonia
Provides way to asynchronous bitmap loading for Avalonia Image control.
Features:
- Supports urls and downloading from web
- Asynchronous loading
- Integrated inmemory cache
- Integrated disk cache
- Easy to implement your own way of images loading and caching
Getting started
- Install
AsyncImageLoader.Avalonia
nuget package
dotnet add package AsyncImageLoader.Avalonia
- Start using
Using
Note: The first time you will need to import the AsyncImageLoader namespace to your xaml file. Usually your IDE should suggest it automatically. The root element in the file will be like this:
<Window ...
xmlns:asyncImageLoader="clr-namespace:AsyncImageLoader;assembly=AsyncImageLoader.Avalonia"
...>
Note: Assets and resources in Avalonia described here.
ImageLoader attached property
The only thing you need to do in your xaml is to replace the Source
property in Image
with ImageLoader.Source
.
For example, your old code:
<Image Source="https://mycoolwebsite.io/image.jpg" />
Should turn into:
<Image asyncImageLoader:ImageLoader.Source="https://mycoolwebsite.io/image.jpg" />
Also you can use ImageLoader.IsLoading
readonly attached property that indicates whether the load is in progress or not.
AsyncImageLoader support resm:
and avares:
links.
And does not support relative referenced assets such as Source="icon.png"
or Source="/icon.png"
. Use AdvancedImage control.
AdvancedImage control
This control provides all capabilities of ImageLoader attached property and support relative referenced assets such as Source="icon.png"
or Source="/icon.png"
.
Before you go, add following style to you App.xaml
file and Application.Styles
section:
<StyleInclude Source="avares://AsyncImageLoader.Avalonia/AdvancedImage.axaml" />
And you can use AdvancedImage
as any other control:
<asyncImageLoader:AdvancedImage Width="150" Height="150" Source="../Assets/cat4.jpg" />
This control allows to specify a custom IAsyncImageLoader for particular control.
Also, this control has loading indicator support out of the box.
Loaders
ImageLoader will use instance of IImageLoader for serving your requests.
You can change the loader used by setting new one to the ImageLoader.AsyncImageLoader property. Do not forget to Dispose previous loader.
There are several loaders available out of the box:
- BaseWebImageLoader - Provides non cached way to asynchronously load images without caching. Can be used as base class for custom loaders you dont want caching in any way.
- RamCachedWebImageLoader - This is inheritor if BaseWebImageLoader with in memory images caching. Can be used as base class for custom loaders you want only inmemory caching.
- DiskCachedWebImageLoader - This is inheritor if RamCachedWebImageLoader with in memory caching and disk caching for downloaded from the internet images. Can be used as base class for custom loaders if you want disk caching out of the box.
RamCachedWebImageLoader
are used by default.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
NuGet packages (2)
Showing the top 2 NuGet packages that depend on AsyncImageLoader.Avalonia:
Package | Downloads |
---|---|
Pwa.Stories
is similar like Instagram Stories |
|
Iciclecreek.AdaptiveCards.Rendering.Avalonia
AdaptiveCard renderer for AvaloniauUI |
GitHub repositories (13)
Showing the top 5 popular GitHub repositories that depend on AsyncImageLoader.Avalonia:
Repository | Stars |
---|---|
Tyrrrz/YoutubeDownloader
Downloads videos and playlists from YouTube
|
|
Tyrrrz/DiscordChatExporter
Exports Discord chat logs to a file
|
|
LykosAI/StabilityMatrix
Multi-Platform Package Manager for Stable Diffusion
|
|
Tyrrrz/YoutubeExplode
Abstraction layer over YouTube's internal API
|
|
PixiEditor/PixiEditor
PixiEditor is a pixel art editor made with .NET 8
|
Version | Downloads | Last updated |
---|---|---|
3.3.0 | 12,425 | 8/17/2024 |
3.2.1 | 31,018 | 9/26/2023 |
3.2.1-rc1 | 124 | 9/23/2023 |
3.2.0 | 3,009 | 8/8/2023 |
3.1.0 | 340 | 7/30/2023 |
3.0.0 | 733 | 7/17/2023 |
3.0.0-avalonia11-preview6 | 796 | 6/1/2023 |
3.0.0-avalonia11-preview5 | 167 | 5/27/2023 |
3.0.0-avalonia11-preview4 | 463 | 3/27/2023 |
3.0.0-avalonia11-preview3 | 634 | 2/6/2023 |
3.0.0-avalonia11-preview2 | 393 | 11/13/2022 |
3.0.0-avalonia11 | 1,442 | 8/23/2022 |
2.5.0 | 418 | 5/22/2023 |
2.4.0 | 4,248 | 7/19/2022 |
2.3.0 | 444 | 7/16/2022 |
2.2.0 | 659 | 6/18/2022 |
2.1.1 | 467 | 6/8/2022 |
2.1.0 | 467 | 11/13/2021 |
2.0.1 | 338 | 11/10/2021 |
2.0.0 | 313 | 11/10/2021 |
1.0.0 | 411 | 11/9/2021 |
- This release contains only Avalonia 11 support