Example #1
0
        void OnScrollToRequested(ScrollToRequestedEventArgs e)
        {
            EventHandler <ScrollToRequestedEventArgs> handler = ScrollToRequested;

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

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

            if (IsPlatformEnabled && _pendingScroll != null)
            {
                OnScrollToRequested(_pendingScroll);
                _pendingScroll = null;
            }
        }
Example #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;
		}
Example #5
0
        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);
        }
Example #7
0
 void OnScrollToRequested(ScrollToRequestedEventArgs e)
 => ScrollToRequested?.Invoke(this, e);
 void OnScrollToRequested(ScrollToRequestedEventArgs e)
 {
     CheckTaskCompletionSource();
     ScrollToRequested?.Invoke(this, e);
 }
Example #9
0
 void Handle_ScrollToRequested(object sender, Xamarin.Forms.ScrollToRequestedEventArgs e)
 {
 }
Example #10
0
		void OnScrollToRequested(ScrollToRequestedEventArgs e)
		{
			CheckTaskCompletionSource();
			EventHandler<ScrollToRequestedEventArgs> handler = ScrollToRequested;
			if (handler != null)
				handler(this, e);
		}
Example #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;
		}
Example #12
0
		public Task ScrollToAsync(double x, double y, bool animated)
		{
			var args = new ScrollToRequestedEventArgs(x, y, animated);
			OnScrollToRequested(args);
			return _scrollCompletionSource.Task;
		}