We already had a implementation of swipe button(thanks to Alexandar , How to implement Swipe Button(with events) in MAUI App?). Out of this, we need to implement some other functionalities:-
- Right to Left swipe (need to set the direction of Swipe)
- Color change while swipe(Need to apply different color of the background while swipe)
- Keep the swipe button at the end(when swiping to the right/left side, button should be placed at the end of the control, current implementation is not like that.)
You can change the
Background
color of the track bar in the process of swiping the control:GestureStatus.Running:
If you want to the swipe button to reach at the end of the trackbar when finishing sliding it, you can set the first parameter:
x
of the method TranslateTo whenGestureStatus.Completed:
Output: