コード例 #1
0
        public Task <double> Render(object value)
        {
            var build = ViewFor(value);
            AsyncEventListener getSize = new AsyncEventListener();

            build.SizeChanged += getSize.Listen;
            Container.Children.Add(build);
            return(getSize.Successfully); // or width if supporting horizontal and used like list/carousel
        }
コード例 #2
0
        private View AddFutureHeight(List <Task <double> > futureHeight, object newItem)
        {
            var view    = ViewFor(newItem);
            var getSize = new AsyncEventListener();

            view.SizeChanged += getSize.Listen;
            futureHeight.Add(getSize.Successfully);
            return(view);
        }