void OnScrollToRequested(ScrollToRequestedEventArgs e)
        {
            EventHandler <ScrollToRequestedEventArgs> handler = ScrollToRequested;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemple #2
0
        void OnScrollToRequested(ScrollToRequestedEventArgs e)
        {
            CheckTaskCompletionSource();
            EventHandler <ScrollToRequestedEventArgs> handler = ScrollToRequested;

            if (handler != null)
            {
                handler(this, e);
            }
        }
        internal override void OnIsPlatformEnabledChanged()
        {
            base.OnIsPlatformEnabledChanged();

            if (IsPlatformEnabled && _pendingScroll != null)
            {
                OnScrollToRequested(_pendingScroll);
                _pendingScroll = null;
            }
        }
Exemple #4
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;
		}
        public void ScrollTo(object item, object group, ScrollToPosition position, bool animated)
        {
            if (!IsGroupingEnabled)
            {
                throw new InvalidOperationException("Grouping is not enabled");
            }
            if (!Enum.IsDefined(typeof(ScrollToPosition), position))
            {
                throw new ArgumentException("position is not a valid ScrollToPosition", "position");
            }

            var args = new ScrollToRequestedEventArgs(item, group, position, animated);

            if (IsPlatformEnabled)
            {
                OnScrollToRequested(args);
            }
            else
            {
                _pendingScroll = args;
            }
        }
        public Task ScrollToAsync(Element element, ScrollToPosition position, bool animated)
        {
            if (!Enum.IsDefined(typeof(ScrollToPosition), position))
            {
                throw new ArgumentException("position is not a valid ScrollToPosition", "position");
            }

            if (element == null)
            {
                throw new ArgumentNullException("element");
            }

            if (!CheckElementBelongsToScrollViewer(element))
            {
                throw new ArgumentException("element does not belong to this ScrollView", "element");
            }

            var args = new ScrollToRequestedEventArgs(element, position, animated);

            OnScrollToRequested(args);
            return(_scrollCompletionSource.Task);
        }
Exemple #7
0
 void OnScrollToRequested(ScrollToRequestedEventArgs e)
 => ScrollToRequested?.Invoke(this, e);
 void OnScrollToRequested(ScrollToRequestedEventArgs e)
 {
     CheckTaskCompletionSource();
     ScrollToRequested?.Invoke(this, e);
 }
 void Handle_ScrollToRequested(object sender, Xamarin.Forms.ScrollToRequestedEventArgs e)
 {
 }
Exemple #10
0
		void OnScrollToRequested(ScrollToRequestedEventArgs e)
		{
			CheckTaskCompletionSource();
			EventHandler<ScrollToRequestedEventArgs> handler = ScrollToRequested;
			if (handler != null)
				handler(this, e);
		}
Exemple #11
0
		public Task ScrollToAsync(Element element, ScrollToPosition position, bool animated)
		{
			if (!Enum.IsDefined(typeof(ScrollToPosition), position))
				throw new ArgumentException("position is not a valid ScrollToPosition", "position");

			if (element == null)
				throw new ArgumentNullException("element");

			if (!CheckElementBelongsToScrollViewer(element))
				throw new ArgumentException("element does not belong to this ScrollVIew", "element");

			var args = new ScrollToRequestedEventArgs(element, position, animated);
			OnScrollToRequested(args);
			return _scrollCompletionSource.Task;
		}
Exemple #12
0
		public Task ScrollToAsync(double x, double y, bool animated)
		{
			var args = new ScrollToRequestedEventArgs(x, y, animated);
			OnScrollToRequested(args);
			return _scrollCompletionSource.Task;
		}