Beispiel #1
0
        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;
        }
Beispiel #2
0
 public GridState()
 {
     Jusitification = TableRowAlignmentValues.Left;
     Borders        = new BorderState[]
     {
         new BorderState(),
         new BorderState(),
         new BorderState(),
         new BorderState(),
         new BorderState(),
         new BorderState()
     };
     ClearCellCache();
 }
Beispiel #3
0
 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>();
 }
Beispiel #4
0
 private static bool AreIdentical(BorderState borderA, BorderState borderB) =>
 borderB != null &&
 borderB.Spacing == 0 &&
 borderB.Thickness == borderA.Thickness &&
 borderB.Color == borderA.Color;
Beispiel #5
0
 private static void RemoveBorder(BorderState border)
 {
     border.Thickness = 0;
     border.Color     = null;
 }