MPowerKit.VirtualizeListView
1.0.0
Prefix Reserved
See the version list below for details.
dotnet add package MPowerKit.VirtualizeListView --version 1.0.0
NuGet\Install-Package MPowerKit.VirtualizeListView -Version 1.0.0
<PackageReference Include="MPowerKit.VirtualizeListView" Version="1.0.0" />
paket add MPowerKit.VirtualizeListView --version 1.0.0
#r "nuget: MPowerKit.VirtualizeListView, 1.0.0"
// Install MPowerKit.VirtualizeListView as a Cake Addin #addin nuget:?package=MPowerKit.VirtualizeListView&version=1.0.0 // Install MPowerKit.VirtualizeListView as a Cake Tool #tool nuget:?package=MPowerKit.VirtualizeListView&version=1.0.0
MPowerKit.VirtualizeListView
MAUI Virtualize ListView with smooth scrolling and without platform-specific code
It's not a secret to anybody, that ListView
and CollectionView
in MAUI have bad scrolling performance. This project started as an experimantal project to find a way to make a virtualize listview using ScrollView
and AbsoluteLayout
only. Suprisingly, the scrolling performance is way better, than was expected. So you can check it right now.
So, under the hood it is a ScrollView
with AbsoluteLayout
as items layout. The main idea of virtualization for this listview is to change Translation of items while keeping them attached to the AbsoluteLayout
. ItemsLayout
is responsible for virtualization process and for creating / removing views and it will not create more views as necessary.
Implemented features:
- Linear items layout
- Grid items layout
- Items spacing
- Virtualization
- Grouping
- Collection padding
- Scroll orientation (collection orientation)
- Disable scrolling
- Header / Footer
- Load more
- Item tap handling
- Item resize handling
- Add, Remove, Replace, Move, Reset operations on collection
- Drag and drop (reordering)
- Sticky headers
Usage
Add UseMPowerKitListView()
to your MauiProgram.cs
file as next
builder
.UseMauiApp<App>()
.UseMPowerKitListView();
and in your xaml just use as a regular CollectionView
.
Note: The root of the ItemTemplate has to be typeof(VirtualizeListViewCell)
, but group/header/footer templates are not allowed to have root of this type.
To change items spacing you need to reset the ItemsLayout
property as next:
<mpowerkit:VirtualizeListView>
<mpowerkit:VirtualizeListView.ItemsLayout>
<mpowerkit:LinearItemsLayout ItemSpacing="15" />
</mpowerkit:VirtualizeListView.ItemsLayout>
</mpowerkit:VirtualizeListView>
By default it has zero spacing.
To change collection orientation just change the Orientation
property of the VirtualizeListView
as you would do this in ScrollView
.
To disable scroll set CanScroll
property to false
, and do not change Orientation
property to Neither
.
Other useful features
FixedRefreshView
This package brings to you fixed MAUI's RefreshView as FixedRefreshView
. Also, you can disable refreshing without disabling entire collection. For this you may use IsPullToRefreshEnabled
.
ObservableRangeCollection
Also, this package contains ObservableRangeCollection
which is a ObservableCollection
, but it has a bunch of useful methods to manipulate the collection with range updates. Recommended to use with VirtualizeListView
.
Known issues
- In debug mode it can have bad scrolling performance, especially on Windows, but in release mode it works surprisingly very well.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-android34.0 is compatible. net8.0-browser was computed. net8.0-ios was computed. net8.0-ios17.2 is compatible. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Microsoft.Maui.Controls (>= 8.0.3)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.3)
-
net8.0-android34.0
- Microsoft.Maui.Controls (>= 8.0.3)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.3)
-
net8.0-ios17.2
- Microsoft.Maui.Controls (>= 8.0.3)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.2.1 | 539 | 11/6/2024 |
2.2.0 | 258 | 11/1/2024 |
2.1.1 | 99 | 11/1/2024 |
2.1.0 | 120 | 10/28/2024 |
2.0.4 | 96 | 10/28/2024 |
2.0.3 | 224 | 10/14/2024 |
2.0.2 | 237 | 9/30/2024 |
2.0.1 | 1,038 | 9/1/2024 |
2.0.0 | 165 | 8/27/2024 |
2.0.0-pre4 | 137 | 8/21/2024 |
2.0.0-pre3 | 129 | 8/21/2024 |
2.0.0-pre2 | 106 | 8/20/2024 |
1.2.5 | 186 | 8/15/2024 |
1.2.4 | 2,909 | 7/26/2024 |
1.2.3 | 94 | 7/26/2024 |
1.2.2 | 85 | 7/26/2024 |
1.2.0 | 109 | 7/23/2024 |
1.1.5 | 115 | 7/8/2024 |
1.1.4 | 126 | 7/3/2024 |
1.1.3 | 133 | 7/1/2024 |
1.1.2 | 100 | 6/26/2024 |
1.1.1 | 884 | 6/4/2024 |
1.1.0 | 120 | 5/31/2024 |
1.0.5 | 473 | 5/23/2024 |
1.0.4 | 116 | 5/21/2024 |
1.0.3 | 119 | 5/21/2024 |
1.0.2 | 363 | 5/13/2024 |
1.0.1 | 105 | 5/12/2024 |
1.0.0 | 117 | 5/11/2024 |