Exemple #1
0
        private nfloat CalcSpanWidth(Layout.Cell cell, nfloat[] columnWidth)
        {
            nfloat spanWidth = 0;

            for (int col = cell.Position.Column; col < cell.Position.Column + cell.Position.ColumnSpan; col++)
            {
                spanWidth += columnWidth[col];
            }
            return(spanWidth);
        }
Exemple #2
0
        private nfloat CalcSpanHeight(Layout.Cell cell, nfloat[] columnHeight)
        {
            nfloat spanHeight = 0;

            for (int row = cell.Position.Row; row < cell.Position.Row + cell.Position.RowSpan; row++)
            {
                spanHeight += columnHeight[row];
            }
            return(spanHeight);
        }
Exemple #3
0
 /// <summary>
 /// This is called when the layout system is defining the size and position
 /// of a cell. You could override to perform additional tasks. It is only
 /// called when the cell's frame would change.
 /// </summary>
 /// <remarks>
 /// You can use cell.Position.Tag, cell.Position.Column/Row, or inspect
 /// cell.View's type to do something special based on the cell.</remarks>
 protected virtual void SetCellFrame(Layout.Cell cell, CGRect frame)
 {
     if (cell.View != null)
     {
         if (RoundLayout)
         {
             frame = frame.RoundLocation();
         }
         cell.View.Frame = frame;
     }
 }