/// <summary> /// set row height /// </summary> public static void SetHeight(this TableRow row, double valMM, HeightRuleValues type = HeightRuleValues.Exact) { var trProp = row.Descendants <TableRowProperties>().FirstOrDefault(); if (trProp == null) { trProp = row.InsertAt(new TableRowProperties(), 0); } var trHeight = trProp.Descendants <TableRowHeight>().FirstOrDefault(); if (trHeight == null) { trHeight = trProp.AppendChild(new TableRowHeight()); } trHeight.HeightType = type; if (type != HeightRuleValues.Auto) { trHeight.Val = (uint)valMM.MMToTwip(); } }
public GridRow(double height, HeightRuleValues heightRule) { this.Height = height; this.HeightRule = heightRule; }