Sharpnado.Maui.DragDropGridView
1.0.1
dotnet add package Sharpnado.Maui.DragDropGridView --version 1.0.1
NuGet\Install-Package Sharpnado.Maui.DragDropGridView -Version 1.0.1
<PackageReference Include="Sharpnado.Maui.DragDropGridView" Version="1.0.1" />
<PackageVersion Include="Sharpnado.Maui.DragDropGridView" Version="1.0.1" />
<PackageReference Include="Sharpnado.Maui.DragDropGridView" />
paket add Sharpnado.Maui.DragDropGridView --version 1.0.1
#r "nuget: Sharpnado.Maui.DragDropGridView, 1.0.1"
#:package Sharpnado.Maui.DragDropGridView@1.0.1
#addin nuget:?package=Sharpnado.Maui.DragDropGridView&version=1.0.1
#tool nuget:?package=Sharpnado.Maui.DragDropGridView&version=1.0.1
<div align="center"> <img src="https://raw.githubusercontent.com/roubachof/Sharpnado.GridLayout/main/Docs/gridlayout.png" alt="DragDropGridView Logo" width="150"/>
Sharpnado.Maui.DragDropGridView
A high-performance drag-and-drop grid layout control for .NET MAUI with adaptive sizing, configurable gesture triggers, and flexible item management. </div>
✨ Features
- 🎯 Drag & Drop: Built-in support for reordering items with smooth animations
- 📐 Flexible Layout: Configurable columns, spacing, and adaptive sizing
- 🎨 Customizable Animations: Predefined or custom animations for drag operations
- 🔄 Data Binding: Full ItemsSource/DataTemplate support with INotifyCollectionChanged
- 📱 Cross-Platform: iOS, Android, Mac Catalyst (grid layout on Windows)
🚀 Quick Start
1. Installation
dotnet add package Sharpnado.Maui.DragDropGridView
2. Initialize in MauiProgram.cs
using Sharpnado.Maui.DragDropGridView;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseSharpnadoDragDropGridView(enableLogging: false);
return builder.Build();
}
}
3. Add to XAML
xmlns:gridLayout="clr-namespace:Sharpnado.Maui.DragDropGridView;assembly=Sharpnado.Maui.DragDropGridView"
<ScrollView>
<gridLayout:DragDropGridView
ColumnCount="2"
ColumnSpacing="10"
RowSpacing="10"
IsDragAndDropEnabled="True"
DragAndDropTrigger="LongPress"
ItemsSource="{Binding Items}">
<gridLayout:DragDropGridView.ItemTemplate>
<DataTemplate>
<gridLayout:DragAndDropView>
<Border Padding="10" Background="LightGray">
<Label Text="{Binding Name}" />
</Border>
</gridLayout:DragAndDropView>
</DataTemplate>
</gridLayout:DragDropGridView.ItemTemplate>
</gridLayout:DragDropGridView>
</ScrollView>
4. Configure Animations (Optional)
using Sharpnado.Maui.DragDropGridView;
// In your view or code-behind
gridView.DragAndDropItemsAnimation = DragDropAnimations.Items.WobbleAsync;
gridView.DragAndDropEndItemsAnimation = DragDropAnimations.EndItems.StopWobbleAsync;
gridView.LongPressedDraggingAnimation = DragDropAnimations.Dragging.ScaleUpBounceAsync;
gridView.LongPressedDroppingAnimation = DragDropAnimations.Dropping.ScaleToBounceAsync;
📖 Documentation
Full documentation available at: GitHub Repository
🎯 Key Properties
| Property | Description |
|---|---|
ItemsSource |
Collection of items to display |
ItemTemplate |
Template for rendering each item |
ColumnCount |
Number of columns in the grid |
IsDragAndDropEnabled |
Enable/disable drag-and-drop |
DragAndDropTrigger |
Pan or LongPress gesture trigger |
OnItemsReorderedCommand |
Command executed when items are reordered |
🎨 Predefined Animations
DragDropAnimations.Dragging
ScaleUpAsync,ScaleUpLargeAsync,ScaleUpBounceAsync
DragDropAnimations.Dropping
ScaleToNormalAsync,ScaleToBounceAsync
DragDropAnimations.Items
WobbleAsync,StopWobbleAsync
🌍 Platform Support
- ✅ iOS 15.0+ (full drag-and-drop)
- ✅ Android API 21+ (full drag-and-drop)
- ✅ Mac Catalyst 15.0+ (full drag-and-drop)
- ⚠️ Windows 10.0.17763.0+ (grid layout only)
📝 License
MIT License - see LICENSE for details
👨💻 Author
Developed by Jean-Marie Alfonsi (Sharpnado)
🐛 Issues & Feedback
Report issues or request features at: GitHub Issues
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-android35.0 is compatible. net9.0-browser was computed. net9.0-ios was computed. net9.0-ios18.0 is compatible. net9.0-maccatalyst was computed. net9.0-maccatalyst18.0 is compatible. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net9.0-windows10.0.19041 is compatible. 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. |
-
net9.0
- Microsoft.Maui.Controls (>= 9.0.110)
- MR.Gestures (>= 5.0.0)
- Sharpnado.TaskMonitor (>= 1.1.0)
-
net9.0-android35.0
- Microsoft.Maui.Controls (>= 9.0.110)
- MR.Gestures (>= 5.0.0)
- Sharpnado.TaskMonitor (>= 1.1.0)
-
net9.0-ios18.0
- Microsoft.Maui.Controls (>= 9.0.110)
- MR.Gestures (>= 5.0.0)
- Sharpnado.TaskMonitor (>= 1.1.0)
-
net9.0-maccatalyst18.0
- Microsoft.Maui.Controls (>= 9.0.110)
- MR.Gestures (>= 5.0.0)
- Sharpnado.TaskMonitor (>= 1.1.0)
-
net9.0-windows10.0.19041
- Microsoft.Maui.Controls (>= 9.0.110)
- MR.Gestures (>= 5.0.0)
- Sharpnado.TaskMonitor (>= 1.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version 1.0.1 - Bug Fixes (November 2025)
BUG FIXES:
🐛 Fixed auto-scrolling behavior during drag operations
🐛 Fixed shadow effect rendering on Android and iOS
Version 1.0.0 - Initial Release (October 2025)
CORE FEATURES:
✨ Automatic grid layout with responsive column calculation
✨ Full ItemsSource/DataTemplate binding with INotifyCollectionChanged support
✨ Header support with custom DataTemplate
✨ Adaptive item width/height based on available space
✨ Configurable column/row spacing and grid padding
✨ Orientation-aware layout (portrait/landscape)
✨ Works seamlessly inside ScrollView with explicit ColumnCount
DRAG & DROP (iOS, Android, Mac Catalyst):
🎯 Built-in drag-and-drop reordering with smooth animations
🎯 Two trigger modes: Pan (immediate) and LongPress (iOS recommended)
🎯 Automatic ScrollView edge detection and auto-scrolling
🎯 Batched shift animations with configurable duration (default 120ms)
🎯 OnItemsReorderedCommand for handling reorder events
🎯 Automatic ItemsSource synchronization for IList collections
CUSTOMIZABLE ANIMATIONS:
🎨 ViewStartDraggingAnimation / ViewStopDraggingAnimation
🎨 DragAndDropEnabledItemsAnimation / DragAndDropDisabledItemsAnimation
🎨 Predefined animations: ScaleUp, ScaleUpBounce, Wobble, and more
🎨 Custom animation functions support
INTEGRATION:
🔧 Pure .NET MAUI implementation
🔧 Includes MR.Gestures fork for reliable gesture handling
🔧 Full logging support with configurable levels
🔧 MVVM-friendly with command and data binding support
PLATFORMS:
✅ iOS 15.0+ (full drag-and-drop)
✅ Android API 21+ (full drag-and-drop)
✅ Mac Catalyst 15.0+ (full drag-and-drop)
⚠️ Windows 10.0.17763.0+ (grid layout only, no drag-and-drop)
See CHANGELOG.md for detailed release notes.