Exemplo n.º 1
0
        protected void WireUpForceUpdateSizeRequested(Cell cell, CellElement cellElement)
        {
            cell.ForceUpdateSizeRequested -= _onForceUpdateSizeRequested;

            _onForceUpdateSizeRequested = (sender, e) => {
                OnForceUpdateSizeRequest(cell, cellElement);
            };

            cell.ForceUpdateSizeRequested += _onForceUpdateSizeRequested;
        }
Exemplo n.º 2
0
        protected void UpdateBackground(CellElement cellElement, Cell cell)
        {
            var backgroundColor = Xamarin.Forms.Color.Default;

            if (backgroundColor == Xamarin.Forms.Color.Default && cell.RealParent is VisualElement element)
            {
                backgroundColor = element.BackgroundColor;
            }

            cellElement.Style.BackgroundColor = backgroundColor.ToGouiColor(Xamarin.Forms.Color.White);
        }
Exemplo n.º 3
0
        public virtual CellElement GetCellElement(Cell cell, CellElement reusableElement, List listView)
        {
            var cellElement = reusableElement ?? CreateCellElement(cell);

            cellElement.Cell = cell;

            WireUpForceUpdateSizeRequested(cell, cellElement);
            UpdateBackground(cellElement, cell);

            return(cellElement);
        }
Exemplo n.º 4
0
 protected virtual void OnForceUpdateSizeRequest(Cell cell, CellElement cellElement)
 {
     cellElement.Style.Height = (int)cell.RenderHeight;
 }
Exemplo n.º 5
0
 protected static void SetRealCell(BindableObject cell, CellElement renderer)
 {
     cell.SetValue(RealCellProperty, renderer);
 }