6

I've created a table with 2 columns. In the second cell of the first row I want to insert another table that have only one cell. The problem is that I can't set the height of the second table. It stretches more than the content height. Its height is equal with the cell height where it was added.

Brian Tompsett - 汤莱恩
  • 5,438
  • 68
  • 55
  • 126
Emanuel
  • 6,252
  • 17
  • 57
  • 77

2 Answers2

10

Table's height depends on its parent container. So you should set height of the parent cell. You can do this in two ways:

cell.MinimumHeight = 50f;

or

 cell.FixedHeight = 70f;
algreat
  • 8,172
  • 5
  • 39
  • 53
3

The height of the table cannot be set, the height of the table is determined by the height of its cells (you can set the height-property of a cell). You could add an empty cell to the second table if you want to stretch this table.

Robin van der Knaap
  • 4,000
  • 2
  • 31
  • 48