New to Telerik UI for .NET MAUI? Start a free 30-day trial

Programmatically Unswiping an Item in CollectionView

Environment

Version Product Author
10.1.0 Telerik UI for .NET MAUI CollectionView Dobrinka Yordanova

Description

In scenarios where an item in the CollectionView is swiped, there might be a need to programmatically return it to its original position.

This knowledge base article also answers the following questions:

  • How can I programmatically close a swiped item in RadCollectionView?
  • What method is used to unswipe an item in RadCollectionView?
  • Is there a way to programmatically reset the swipe state of an item in RadCollectionView?

Solution

To programmatically unswipe an item in RadCollectionView, use the EndItemSwipe() method. This method reverts a swiped item back to its original position.

Here is a simple example of how to use the EndItemSwipe() method:

// Assuming you have an instance of RadCollectionView named 'collectionView'
collectionView.EndItemSwipe();

For more detailed information about item swipe functionality, including the EndItemSwipe() method, refer to the CollectionView Item Swipe Overview.

See Also

In this article