예제 #1
0
        internal void ScrollIndexIntoViewCore(ScrollIntoViewOperation <ItemInfo?> scrollOperation)
        {
            var update = new DelegateUpdate <UpdateFlags>(() =>
            {
                if (scrollOperation.ScrollAttempts < ScrollIntoViewOperation <ItemInfo?> .MaxScrollAttempts)
                {
                    if (this.IsIndexInView(scrollOperation))
                    {
                        if (scrollOperation.CompletedAction != null)
                        {
                            this.View.UpdateService.RegisterUpdate(new DelegateUpdate <UpdateFlags>(scrollOperation.CompletedAction)
                            {
                                Flags = UpdateFlags.AffectsScrollPosition
                            });
                        }
                    }
                    else
                    {
                        this.ScrollIndexIntoView(scrollOperation);
                        scrollOperation.ScrollAttempts++;

                        this.ScrollIndexIntoViewCore(scrollOperation);
                    }
                }
            })
            {
                RequiresValidMeasure = true,
                Flags = UpdateFlags.AffectsScrollPosition
            };

            this.View.UpdateService.RegisterUpdate(update);
        }
예제 #2
0
 public void RegisterUpdate(DelegateUpdate update)
 {
     this.updatesQueue.Enqueue(update);
 }