TableRow.isHeader: true should make row added to thead section of table
The constructors for the LINQPad.Controls.TableRow has an isHeader parameter which controls what type of cells are auto generated when given a collection of controls. But otherwise, it's treated as a normal row.
It ought to also control what section of the Table it is rendered in as well and put these rows in the thead section. Right now, all rows are thrown into the tbody of the Table class.
I have my own custom implementations to work around this, but it ought to be in the builtins.
class TableRowEx : TableRow
{
...
public bool IsHeader { get; set; }
}
class TableEx : Table
{
...
protected override void OnRendering(EventArgs e)
{
var partition = Rows.ToLookup(r => r.IsHeader);
VisualTree.Clear();
if (partition[true].Any())
VisualTree.Add(new Control("thead", partition[true]));
VisualTree.Add(new Control("tbody", partition[false]));
base.OnRendering(e);
}
}