The
RadListView
control is now obsolete and will be removed in the future. Use the RadCollectionView control instead. TheRadCollectionView
is a complete, ground-up rewrite of the ListView. TheRadCollectionView
offers improved performance, enhanced features, and a modernized approach to managing lists of data. TheRadCollectionView
incorporates all of the ListView's key features. More about the differences between both components and how to migrate to the newRadCollectionView
is available in the Migrating the Telerik .NET MAUI RadListView to RadCollectionView article.
.NET MAUI ListView Events
The ListView component exposes a set of events.
Item Events
-
ItemTapped
—Occurs when an item is tapped. TheItemTapped
event handler receives two parameters:- The sender argument which is of type object, but can be cast to the
RadListView
type. - An
ItemTapEventArgs
object which has a reference to the tapped item through itsItem
property.
- The sender argument which is of type object, but can be cast to the
-
ItemHold
—Occurs when the end user is holding on a specific item. TheItemHold
event handler receives two parameters:- The sender argument which is of type object, but can be cast to the
RadListView
type. - An
ItemHoldEventArgs
object which has a reference to the held item through itsItem
property.
- The sender argument which is of type object, but can be cast to the
-
RefreshRequested
—Occurs when the pull-to-refresh gesture is triggered. TheRefreshRequested
event handler receives two parameters:- The sender argument which is of type object, but can be cast to the
RadListView
type. - A
PullToRefreshRequestedEventArgs
object which provides Cancel property used to cancel the pull-to-refresh operation.
For more details on the
RefreshRequested
event usage, refer to the Pull to Refresh topic. - The sender argument which is of type object, but can be cast to the
Selection Events
The SelectionChanged
occurs when the SelectionItems
collection is updated. The SelectionChanged
event handler receives two parameters:
- The sender argument which is of type object, but can be cast to the
RadListView
type. - A
NotifyCollectionChangedEventArgs
object which provides information on the collection changed event. For more details, refer to the NotifyCollectionChangedEventArgs Class topic.
Group/Reorder Events
-
GroupHeaderTapped
—Occurs when a group header of a grouped ListView is tapped. TheGroupHeaderTapped
event handler receives two parameters:- The sender argument which is of type object, but can be cast to the
RadListView
type. - A
GroupHeaderTapEventArgs
object which provides the following properties:-
Key
—Gets the specific key for the group. -
Items
—Gets the child items of the group.
-
- The sender argument which is of type object, but can be cast to the
-
ReorderStarting
—Occurs when a reorder operation is about to start. TheReorderStarting
event handler receives two parameters:- The sender argument which is of type object, but can be cast to the
RadListView
type. - A
ReorderStartingEventArgs
object provides the following properties:-
Item
—Gets the item that is about to be dragged. -
Cancel
—A boolean property which can be used to cancel the reorder operation.
-
- The sender argument which is of type object, but can be cast to the
-
ReorderEnded
—Occurs when a reorder operation has ended. TheReorderEnded
event handler receives two parameters:- The sender argument which is of type object, but can be cast to the
RadListView
type. - A
ReorderEndedEventArgs
object which has a reference to the item that was reordered through itsItem
property.
- The sender argument which is of type object, but can be cast to the
Swipe Events
The ListView exposes a few useful events related to the item swiping feature, namely ItemSwipeStarting
, ItemSwiping
and ItemSwipeCompleted
. For detailed information on using the swiping events, refer to the Cell Swipe topic.