RelativePaddingExamples.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using NUnit.Framework;
  2. using QuestPDF.Examples.Engine;
  3. using QuestPDF.Fluent;
  4. using QuestPDF.Helpers;
  5. namespace QuestPDF.Examples
  6. {
  7. public class RelativePaddingExamples
  8. {
  9. [Test]
  10. public void ItemTypes()
  11. {
  12. RenderingTest
  13. .Create()
  14. .ProduceImages()
  15. .PageSize(250, 250)
  16. .ShowResults()
  17. .Render(container =>
  18. {
  19. container
  20. .Width(250)
  21. .Height(250)
  22. .Padding(50)
  23. .Background(Colors.Grey.Lighten2)
  24. .RelativePaddingLeft(0.1f)
  25. .RelativePaddingTop(0.2f)
  26. .RelativePaddingRight(0.3f)
  27. .RelativePaddingBottom(0.4f)
  28. .Background(Colors.Grey.Darken2);
  29. });
  30. }
  31. }
  32. }