private static void SetMax(BorderState bLeft, BorderState bRight) { var max = (bLeft.Thickness >= bRight.Thickness) ? bLeft : bRight; bLeft.Thickness = max.Thickness; bLeft.Color = max.Color; bRight.Thickness = 0; bRight.Color = null; }
public GridState() { Jusitification = TableRowAlignmentValues.Left; Borders = new BorderState[] { new BorderState(), new BorderState(), new BorderState(), new BorderState(), new BorderState(), new BorderState() }; ClearCellCache(); }
public CellState(GridState grid = null) { Grid = grid; VNode = new VNode(); TableCells = new List <TableCell>(1); Borders = new BorderState[4] { new BorderState(), new BorderState(), new BorderState(), new BorderState() }; VerticalAlignment = TableVerticalAlignmentValues.Top; HeightRule = HeightRuleValues.Auto; WidthRule = TableWidthUnitValues.Auto; ParagraphProperties = new List <OpenXmlElement>(); RunProperties = new List <OpenXmlElement>(); }
private static bool AreIdentical(BorderState borderA, BorderState borderB) => borderB != null && borderB.Spacing == 0 && borderB.Thickness == borderA.Thickness && borderB.Color == borderA.Color;
private static void RemoveBorder(BorderState border) { border.Thickness = 0; border.Color = null; }