internal override void OnIsPlatformEnabledChanged() { base.OnIsPlatformEnabledChanged(); if (IsPlatformEnabled && _pendingScroll != null) { OnScrollToRequested(_pendingScroll); _pendingScroll = null; } }
public void ScrollTo(object item, ScrollToPosition position, bool animated) { if (!Enum.IsDefined(typeof(ScrollToPosition), position)) { throw new ArgumentException("position is not a valid ScrollToPosition", "position"); } var args = new ScrollToRequestedEventArgs(item, position, animated); if (IsPlatformEnabled) { OnScrollToRequested(args); } else { _pendingScroll = args; } }
void OnScrollToRequested(ScrollToRequestedEventArgs e) => ScrollToRequested?.Invoke(this, e);