MPowerKit.VirtualizeListView
1.2.5
Prefix Reserved
See the version list below for details.
dotnet add package MPowerKit.VirtualizeListView --version 1.2.5
NuGet\Install-Package MPowerKit.VirtualizeListView -Version 1.2.5
<PackageReference Include="MPowerKit.VirtualizeListView" Version="1.2.5" />
<PackageVersion Include="MPowerKit.VirtualizeListView" Version="1.2.5" />
<PackageReference Include="MPowerKit.VirtualizeListView" />
paket add MPowerKit.VirtualizeListView --version 1.2.5
#r "nuget: MPowerKit.VirtualizeListView, 1.2.5"
#:package MPowerKit.VirtualizeListView@1.2.5
#addin nuget:?package=MPowerKit.VirtualizeListView&version=1.2.5
#tool nuget:?package=MPowerKit.VirtualizeListView&version=1.2.5
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 POC 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.
It works on all platforms MAUI supports and it has the same behavior on all platforms, because it does not have platform-specific code.
So, under the hood it is a ScrollView with custom typeof(Layout) as items layout. The main idea of virtualization for this listview is to change Translation (virtual position, but on Android it is still physical chage because of #5) of items while keeping them attached to the layout. VirtualizeItemsLayoutManger is responsible for virtualization process and for creating / removing views and it will not create more views as necessary.
Your PRs are welcome!
| Android | Windows |
|---|---|
| <video src="https://github.com/MPowerKit/VirtualizeListView/assets/23138430/edd8aa08-3a6a-404f-9e95-28343b13498f" controls="controls" width="287" height="630"/> | <video src="https://github.com/MPowerKit/VirtualizeListView/assets/23138430/e9b6715a-7f56-4f23-b757-9c18c6597fad" controls="controls" width="426" height="240"/> |
Implemented features:
- Linear items layout
- Grid items layout
- Items spacing
- Virtualization
- Grouping
- Collection padding
- Scroll orientation (collection orientation)
- Disable scrolling
- Header / Footer
- Load more
- Scroll speed
- Cache pool
- Item tap handling
- Item resize handling
- Add, Remove, Replace, Move, Reset operations on collection
- Drag and drop (reordering)
- Sticky headers
- Animated add/remove/move operations
Tips for better scrolling user experience
- Bindings - your enemy. Try to avoid bindings in your item templates or do
OneTimewhere you can. But if you need them, use only compiled bindings or better levitali/CompiledBindings library. - Try to avoid using triggers, they are slow.
- Use as less templates as possible. The more templates you have, the more time it takes to create a view.
- Use
InitialCachePoolSizeto set up the number of initial views to keep in cache. Default size is 4. The bigger value - the more cached views it creates during initialization. And if you have a lot of templates it can take some time to initialize pool for each template. So in this case just manipulate with theInitialCachePoolSize. If you have only 1 template, you can set it to 2, it will be enough. - Create separate view for
DataTemplateand replace bindings where you can by manual setting the values from the code behind of that view. - Use as less layouts as possible. Use only
ContentView,Grid,VerticalStackLayoutorHorizontalStackLayout. Try to avoid usingBorderorFrame, better createRoundBorderEffect. - Try to avoid using
Shadowproperty in your templates. It can slow down the rendering process. - Set the direct dimensions for your controls where you can in the template, especially for
Image. - If you have very complex layout and the
VirtualizeListViewstill not smooth and laggy, you can try to decreaseScrollSpeed, it may help in some cases. (MAUI does a lot of redundant work remeasuring and relayouting views few times).
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:LinearLayout ItemSpacing="15"
InitialCachePoolSize="4" />
</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. Here, you can disable refreshing without disabling entire collection. For this you may use IsPullToRefreshEnabled.
ObservableRangeCollection
Also, this package contains ObservableRangeCollection which is an ObservableCollection, but it has a bunch of useful methods to manipulate the collection with batch updates. Recommended to use with VirtualizeListView. It provides few methods: AddRange, InsertRange, RemoveRange, ReplaceRange.
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-maccatalyst17.2 is compatible. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net8.0-windows10.0.22621 is compatible. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Maui.Controls (>= 8.0.3)
-
net8.0-android34.0
- Microsoft.Maui.Controls (>= 8.0.3)
-
net8.0-ios17.2
- Microsoft.Maui.Controls (>= 8.0.3)
-
net8.0-maccatalyst17.2
- Microsoft.Maui.Controls (>= 8.0.3)
-
net8.0-windows10.0.22621
- Microsoft.Maui.Controls (>= 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.7.1 | 577 | 10/17/2025 |
| 2.7.0 | 197 | 10/15/2025 |
| 2.6.0 | 286 | 10/3/2025 |
| 2.5.1 | 4,217 | 8/1/2025 |
| 2.5.0 | 111 | 8/1/2025 |
| 2.4.3 | 1,029 | 6/26/2025 |
| 2.4.2 | 694 | 6/12/2025 |
| 2.4.1 | 608 | 5/30/2025 |
| 2.4.0 | 1,069 | 5/21/2025 |
| 2.3.2 | 2,375 | 3/27/2025 |
| 2.3.1 | 683 | 3/21/2025 |
| 2.3.0 | 1,162 | 3/7/2025 |
| 2.2.2 | 528 | 3/6/2025 |
| 2.2.1 | 3,003 | 11/6/2024 |
| 2.2.0 | 500 | 11/1/2024 |
| 2.1.1 | 191 | 11/1/2024 |
| 2.1.0 | 204 | 10/28/2024 |
| 2.0.4 | 180 | 10/28/2024 |
| 2.0.3 | 312 | 10/14/2024 |
| 2.0.2 | 295 | 9/30/2024 |
| 2.0.1 | 2,569 | 9/1/2024 |
| 2.0.0 | 298 | 8/27/2024 |
| 2.0.0-pre4 | 222 | 8/21/2024 |
| 2.0.0-pre3 | 211 | 8/21/2024 |
| 2.0.0-pre2 | 157 | 8/20/2024 |
| 1.2.5 | 250 | 8/15/2024 |
| 1.2.4 | 3,029 | 7/26/2024 |
| 1.2.3 | 168 | 7/26/2024 |
| 1.2.2 | 163 | 7/26/2024 |
| 1.2.0 | 187 | 7/23/2024 |
| 1.1.5 | 217 | 7/8/2024 |
| 1.1.4 | 207 | 7/3/2024 |
| 1.1.3 | 285 | 7/1/2024 |
| 1.1.2 | 203 | 6/26/2024 |
| 1.1.1 | 993 | 6/4/2024 |
| 1.1.0 | 203 | 5/31/2024 |
| 1.0.5 | 522 | 5/23/2024 |
| 1.0.4 | 194 | 5/21/2024 |
| 1.0.3 | 171 | 5/21/2024 |
| 1.0.2 | 443 | 5/13/2024 |
| 1.0.1 | 181 | 5/12/2024 |
| 1.0.0 | 172 | 5/11/2024 |