Guest User

Untitled

a guest
Feb 24th, 2020
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.60 KB | None | 0 0
  1. DocumentAdv document = new DocumentAdv();
  2. SectionAdv section = new SectionAdv();
  3.  
  4. TableAdv table = new TableAdv();
  5.  
  6. TableFormat tableFormat = new TableFormat();
  7. Borders borders = new Borders();
  8. Border left = new Border();
  9. left.Color = Colors.Black;
  10. left.LineStyle = LineStyle.Single;
  11. borders.Left = left;
  12. Border right = new Border();
  13. borders.Right = right;
  14. right.LineStyle = LineStyle.Single;
  15. right.Color = Colors.Black;
  16. borders.Right = right;
  17. Border top = new Border();
  18. top.LineStyle = LineStyle.Single;
  19. top.Color = Colors.Black;
  20. borders.Top = top;
  21. Border bottom = new Border();
  22. bottom.LineStyle = LineStyle.Single;
  23. bottom.Color = Colors.Black;
  24. borders.Bottom = bottom;
  25. Border diagonalUp = new Border();
  26. diagonalUp.LineStyle = LineStyle.Single;
  27. diagonalUp.Color = Colors.Black;
  28. borders.DiagonalUp = diagonalUp;
  29. Border diagonalDown = new Border();
  30. diagonalDown.LineStyle = LineStyle.Single;
  31. diagonalDown.Color = Colors.Black;
  32. borders.DiagonalDown = diagonalDown;
  33. Border horizontal = new Border();
  34. horizontal.LineStyle = LineStyle.Single;
  35. horizontal.Color = Colors.Black;
  36. borders.Horizontal = horizontal;
  37. Border vertical = new Border();
  38. vertical.LineStyle = LineStyle.Single;
  39. vertical.Color = Colors.Black;
  40. borders.Vertical = vertical;
  41.  
  42. table.TableFormat = tableFormat;
  43.    
  44. TableRowAdv row = new TableRowAdv();
  45. TableCellAdv cell = new TableCellAdv();
  46. ParagraphAdv paragraph = new ParagraphAdv();
  47. SpanAdv span = new SpanAdv();
  48.  
  49. span.Text = "Hello World";
  50. paragraph.Inlines.Add(span);
  51. cell.Blocks.Add(paragraph);
  52. row.Cells.Add(cell);
  53. table.Rows.Add(row);
  54. section.Blocks.Add(table);
Advertisement
Add Comment
Please, Sign In to add comment