simplified AspectRatio code, better exception handling for QuestPdf.Examples, fixed Placeholder image

This commit is contained in:
Marcin Ziąbek
2021-03-23 14:43:03 +01:00
parent 5e9ff7ec1e
commit 08126b2fa4
7 changed files with 51 additions and 15 deletions
+32
View File
@@ -134,5 +134,37 @@ namespace QuestPDF.Examples
.Height(150);
});
}
//[ShowResult]
[ImageSize(300, 200)]
public void Debug(IContainer container)
{
container
.Padding(25)
.Debug()
.Padding(-5)
.Row(row =>
{
row.RelativeColumn().Padding(5).Extend().Placeholder();
row.RelativeColumn().Padding(5).Extend().Placeholder();
});
}
[ShowResult]
[ImageSize(300, 200)]
public void ElementEnd(IContainer container)
{
var text = "";
container
.Padding(10)
.Element(x =>
{
if (string.IsNullOrWhiteSpace(text))
x.Height(10).Width(50).Background("#DDD");
else
x.Text(text);
});
}
}
}