void OnScrollToRequested(ScrollToRequestedEventArgs e) { EventHandler <ScrollToRequestedEventArgs> handler = ScrollToRequested; if (handler != null) { handler(this, e); } }
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; } }
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); }
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) { }
void OnScrollToRequested(ScrollToRequestedEventArgs e) { CheckTaskCompletionSource(); EventHandler<ScrollToRequestedEventArgs> handler = ScrollToRequested; if (handler != null) handler(this, e); }
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; }
public Task ScrollToAsync(double x, double y, bool animated) { var args = new ScrollToRequestedEventArgs(x, y, animated); OnScrollToRequested(args); return _scrollCompletionSource.Task; }