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

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

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

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