Migrate from Xamarin.Forms SfListView to .NET MAUI SfListView
9 Jul 20262 minutes to read
To make migration easier from Xamarin SfListView to .NET MAUI SfListView, we kept most of the APIs from Xamarin SfListView in MAUI SfListView. However, to maintain the consistency of API naming in MAUI SfListView, we renamed some of the APIs. The APIs that have been changed in MAUI SfListView from Xamarin SfListView are detailed as follows.
Namespaces
| Xamarin SfListView | .NET MAUI SfListView |
|---|---|
| Syncfusion.ListView.XForms | Syncfusion.Maui.ListView |
| Syncfusion.ListView.XForms.Control.Helpers | Syncfusion.Maui.ListView.Helpers |
| Syncfusion.DataSource | Syncfusion.Maui.DataSource |
| Syncfusion.DataSource.Extensions | Syncfusion.Maui.DataSource.Extensions |
Properties
| Xamarin SfListView | .NET MAUI SfListView | Description |
|---|---|---|
| Gets or sets the System.Windows.Input.ICommand which is executed on long-pressing a SfListView item. | ||
| Gets or sets the parameter for LongPressCommand. | ||
| Gets or sets the selection background color for the selected item. | ||
Behavioral change: Xamarin IsBusy was a general busy indicator, while MAUI IsLazyLoading is specific to the load-more operation. Gets or sets a value indicating whether the SfListView is busy loading more items. If it is true, the load more indicators will be displayed until it is set to false. |
||
| Gets the item data of the tapped item. | ||
| Gets the item data of the long pressed item. | ||
| Gets the item data of the double tapped item. | ||
| Gets the underlying data object of the SfListView item when the item appears from the bound data source. | ||
| Gets the underlying data object of the SfListView item when the item disappears from the bound data source. | ||
| Gets the underlying data of the queried item. | ||
| Gets the underlying data object of the SfListView item currently being dragged from the data source. | ||
| A property that gets or sets a value that determines whether to adjust the X position of the drag item for vertical orientation and the Y position for horizontal orientation. | ||
A property that gets or sets the layout definition for SfListView. The default layout is LinearItemsLayout (vertical orientation). |
Enums
| Enum | Xamarin SfListView | .NET MAUI SfListView | Description |
|---|---|---|---|
| Top, Bottom |
Start, End |
Defines position for the load more support of SfListView. | |
| Hold | LongPress | Describes the possible values of a touch gesture used to trigger gesture-based interactions (such as long press) on SfListView items. |
Events
| Xamarin SfListView | .NET MAUI SfListView | Description |
|---|---|---|
| Occurs when an item is long pressed. |
Classes
| Xamarin SfListView | .NET MAUI SfListView | Description |
|---|---|---|
| Represents the footer item of data in the SfListView control. | ||
| Defines the position of the footer when IsStickyFooter is enabled. | ||
| Represents the group header item in a SfListView control. | ||
| Represents the header item of data in the SfListView control. | ||
| Provides data for ItemLongPress event. | ||
| A loading indicator which will be displayed when loading more items into the list view is in progress. | ||
| Represents the load more item in a SfListView control. | ||
| Defines the base for the layouts. | ||
| Converter to reverse the boolean value. |