Exemple #1
0
        internal override void OnIsPlatformEnabledChanged()
        {
            base.OnIsPlatformEnabledChanged();

            if (IsPlatformEnabled && _pendingScroll != null)
            {
                OnScrollToRequested(_pendingScroll);
                _pendingScroll = null;
            }
        }
Exemple #2
0
        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;
            }
        }
Exemple #3
0
 void OnScrollToRequested(ScrollToRequestedEventArgs e)
 => ScrollToRequested?.Invoke(this, e);