private void HandleAction(Foundation.NSObservedChange obj) { double effectiveY = Math.Max(Control.ContentOffset.Y, 0); if (!CloseTo(effectiveY, prevYOffset) && Element is AlternatingListView) { AlternatingListView myList = Element as AlternatingListView; myList.IsScrolling = true; prevYOffset = effectiveY; } }
private void HandleAction(Foundation.NSObservedChange obj) { // Remove the inset from the calculated x position var correctedXScroll = ItemsViewController.CollectionView.ContentOffset.X + Frame.Width / 2 - Frame.Height / 2; // Get the total content width var totalWidth = ItemsViewController.CollectionView.ContentSize.Width; Debug.WriteLine($"Scrolled to:{ItemsViewController.CollectionView.ContentOffset.X} / {totalWidth}"); // Update the view CollectionElement.UpdateXScroll((int)correctedXScroll, (int)totalWidth); }
private void HandleAction(Foundation.NSObservedChange obj) { var effectiveY = Math.Max(Control.ContentOffset.Y, 0); if (!CloseTo(effectiveY, _prevYOffset) && Element is ScrollListView) { var direction = effectiveY > _prevYOffset ? ScrollListView.ScrollDirection.UP : ScrollListView.ScrollDirection.DOWN; var myList = Element as ScrollListView; myList.LastScrollDirection = direction; myList.AtStartOfList = CloseTo(effectiveY, 0); _prevYOffset = effectiveY; } }
private void HandleAction(Foundation.NSObservedChange obj) { var effectiveY = Math.Max(Control.ContentOffset.Y, 0); if (!CloseTo(effectiveY, _prevYOffset) && _myListView != null) { var direction = effectiveY > _prevYOffset ? MyListView.ScrollToEnd : MyListView.ScrollToStart; _myListView.LastScrollDirection = direction; _prevYOffset = effectiveY; _myListView.AtStartOfList = CloseTo(effectiveY, 0); _myListView.AtEndOfList = IsAtEndOfList(); } }
void FrameAction(Foundation.NSObservedChange obj) { HandleUIChange(); Invalidate(); }
private void HandleAction(Foundation.NSObservedChange obj) { effect.OnScrollEffect(Element, new ScrollEventArgs(((UITableView)Control).ContentOffset.Y)); }