UWP: Disable Pivot swipe left/right while horizontal scroll ListView inside

Problem:
– You have Pivot
– You have horizontal ListView inside PivotItem
– When you scroll ListView items to the last, the pivot automatically swipe to next PivotItem. So you want remain the current PivotItem view without go to next PivotItem?

Cause:
– Both Pivot and ListView have ScrollViewer by default inside. By default these ScrollViewer have ScrollViewer.IsHorizontalScrollChainingEnabled Property set to True. It means that “true to enable horizontal scroll chaining from child to parent; otherwise, false.” base on MSDN

Solution:
Set the property ScrollViewer.IsHorizontalScrollChainingEnabled=”False” for the ListView inside PivotItem to avoid this problem.

Reference:
https://stackoverflow.com/questions/35207827/disable-pivot-swipe-during-scrolling-on-uwp-app

Leave a Reply