Browse Source

Added example: workaround to column-based layout

MarcinZiabek 2 years ago
parent
commit
682a7a00e5
1 changed files with 34 additions and 0 deletions
  1. 34 0
      QuestPDF.Examples/ElementExamples.cs

+ 34 - 0
QuestPDF.Examples/ElementExamples.cs

@@ -843,5 +843,39 @@ namespace QuestPDF.Examples
                         });
                 });
         }
+        
+        [Test]
+        public void VerticalColumns()
+        {
+            RenderingTest
+                .Create()
+                .PageSize(800, 400)
+                .ShowResults()
+                .ProduceImages()
+                .Render(container =>
+                {
+                    container
+                        .Padding(25)
+                        .FlipVertical()
+                        .RotateLeft()
+                        .Inlined(inlined =>
+                        {
+                            foreach (var i in Enumerable.Range(0, 50))
+                            {
+                                inlined
+                                    .Item()
+                                    .RotateRight()
+                                    .FlipVertical()
+                                    .MaxWidth(250)
+                                    .Background(Placeholders.BackgroundColor())
+                                    .Padding(10)
+                                    .Text($"{i}: {Placeholders.Label()}")
+                                    .FontSize(15);
+                            }
+                        });
+                });
+            
+            
+        }
     }
 }