コード例 #1
0
        private void SvScrollView_Scrolled(object sender, ScrolledEventArgs e)
        {
            double scrollingSpace = svScrollView.ContentSize.Height - svScrollView.Height - 20;

            if (scrollingSpace <= e.ScrollY && !IsRefreshing)
            {
                if (ItemsSource.Any())
                {
                    ItemAppearing?.Invoke(this, new ItemVisibilityEventArgs(ItemsSource[ItemsSource.Count - 1]));
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// Called on appearing sequence complete
        /// </summary>
        /// <param name="_itemToAnimate"></param>
        public void OneItemAppearingCompleted(ItemParticlesAnimation _itemToAnimate)
        {
            if (_itemToAnimate.itemAnimationData.compt > 0)
            {
                ItemAppearing?.Invoke(_itemToAnimate);
            }

            _itemToAnimate.itemAnimationData.compt--;

            if (_itemToAnimate.itemAnimationData.compt <= 0)
            {
                _itemToAnimate.itemAnimationData.compt = _itemToAnimate.itemAnimationData.quantity;
                OnAppearingCompleted?.Invoke(_itemToAnimate);
            }
        }
コード例 #3
0
        private void Carousel_PositionSelected(object sender, SelectedPositionChangedEventArgs e)
        {
            if (Carousel.Position == ItemsSourceProxy.Count - 1 && !IsRefreshing && CanRefresh)
            {
                ItemAppearing?.Invoke(this, new ItemVisibilityEventArgs(ItemsSourceProxy[Carousel.Position]));
            }

            if (autoscrollUpdated && autoscrollRunning)
            {
                //If the auto scroller updated the item ignore
                autoscrollUpdated = false;
            }
            else
            {
                autoscrollRunning = false;
            }
        }
コード例 #4
0
 private void LvListView_ItemAppearing(object sender, ItemVisibilityEventArgs e)
 {
     ItemAppearing?.Invoke(this, e);
 }
コード例 #5
0
ファイル: ListView.cs プロジェクト: zy55769068/Xamarin.Forms
 public void SendCellAppearing(Cell cell)
 => ItemAppearing?.Invoke(this, new ItemVisibilityEventArgs(cell.BindingContext));
コード例 #6
0
 public void SendCellAppearing(Cell cell)
 => ItemAppearing?.Invoke(this, new ItemVisibilityEventArgs(cell.BindingContext, TemplatedItems.GetGlobalIndexOfItem(cell?.BindingContext)));