Releases: roubachof/Sharpnado.CollectionView
Fixes one memory leak in iOS
iOS memory leak fix thanks to Adam
.net 7 + leaks + update layout command
CollectionView.Maui
Bindable ColumnCount and ScrollTo method
And some fixes including #47
Full Changelog: v2.0.0...v2.1.0
CollectionView 2.0 is reborn with header/footer/grouping
Version 2.0 breaking changes: CollectionView
HorizontalListView has finally been renamed CollectionView \o/.
All references to HorizontalList has been renamed to Collection, including:
- namespaces
- filename
- class names
- HorizontalListViewLayout => CollectionViewLayout
- ListLayout => CollectionLayout
Header/Footer implementation thanks to SizedDataTemplate
Fixes
Drag and drop directions
DragAndDropTrigger and DragAndDropDirection
Since 1.8.2, you can now choose if you want to begin the drag and drop with a Pan gesture or a LongPress.
DragAndDropTrigger="Pan"DragAndDropTrigger="LongTap"
You can also restrict the drag movement to a given direction:
- For the horizontal layout:
DragAndDropDirection = HorizontalOnly - For the vertical layout:
DragAndDropDirection = VerticalOnly
It will give a better more precise drag experience, more precise.
Fixes:
EnableDragAndDrop at runtime with custom animations !
NEW
EnableDragAndDropis now a bindable property so drag and drop can be enabled and disabled at runtime- You can specify an animation for the drag and drop mode with the
DragAndDropEnabledAnimationAsyncproperty - You can decide to start the drag without long press on iOS thanks to the iOS specific property
iOSDragAndDropOnPanGestureto true
Example
HorizontalListView.DragAndDropEnabledAnimationAsync = async (viewCell, token) =>
{
while (!token.IsCancellationRequested)
{
await viewCell.View.RotateTo(8);
await viewCell.View.RotateTo(-8);
}
await viewCell.View.RotateTo(0);
};Fixes
Reveal animations and DragAndDropInfo
Version 1.8 breaking change
Namespace changed from Sharpnado.Presentation.Forms.HorizontalListView to Sharpnado.HorizontalListView.
HorizontalListView, like MaterialFrame, Tabs and Shadows, now uses the same xml namespace: http://sharpnado.com.
Because of how works xaml compilation, you need to add code in your App.xaml.cs referencing the sharpnado assembly:
public App()
{
InitializeComponent();
Sharpnado.HorizontalListView.Initializer.Initialize(true, false);
...
}Reveal animations
Contributor: original idea from @jmmortega.
You can set custom animations on cells that will be triggered when a cell appears for the first time.
Properties for reveal animations
public Func<ViewCell, Task> PreRevealAnimationAsync { get; set; }
public Func<ViewCell, Task> RevealAnimationAsync { get; set; }
public Func<ViewCell, Task> PostRevealAnimationAsync { get; set; }see docs for example.
DragAndDropInfo
The DragAndDropStartCommand and DragAndDropEndedCommand commands will now pass as argument a DragAndDropInfo object:
public class DragAndDropInfo
{
public int To { get; }
public int From { get; }
public object Content { get; }
}Contributor: Implemented by @jmmortega.

