-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the ability to disable swiping on SwipeView but keep the content enabled #20142
Comments
I did manage to test the following work-a-round: adding items during runtime via triggers will achieve the desired effect of disabling the swipe. An example below:
Rather unwieldy, but does work. Don't know what happens if you constantly change though. |
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process. |
Verified this on VS 17.10.0 Preview 1.0(8.0.6). Repro on Windows 11, Android 14.0-API34, iOS 17.2 and MacCatalyst with below Project: |
I am experiencing the same issue. Is there a good workaround? |
See previous comment: #20142 (comment) |
Unfortunately, that does not disable swiping, it just disables those individual swipe items. It would be good to have something like a "IsRightSwipeGestureEnabled" or/and "IsLeftSwipeGestureEnabled" property. |
you can set |
I can confirm that setting all SwipeItemView's "isVisible" to false work-a-round works on iOS and Android. |
It works, however it logs an excpetion: System.InvalidOperationException: PlatformView cannot be null here |
Description
When a swipeview contains some buttons or other gesture controls, disabling the swipe will also disable those controls.
Steps to Reproduce
Expected result: We can't swipe, but we can click the button.
Actual Result: We cannot press the button
Notes:
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
No response
Did you find any workaround?
I have not found a good work-a-round. I did try using InputTransparent instead, and that makes the button enabled, but not clickable.
If you're using a collectionview, you can use a datatemplate selector to pick a view with or without the swipeview. Make sure there are no swipe items also works, but I haven't tested if that is feasible during runtime.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: