Add option to show separator between table rows (#1304)

* Add option to show separator between table rows
* Panels should show header if borders are not shown

Closes #835
This commit is contained in:
Patrik Svensson
2023-09-16 18:49:12 +02:00
committed by GitHub
parent 037e109699
commit c82d8c4523
33 changed files with 272 additions and 43 deletions

View File

@@ -13,7 +13,12 @@ public abstract partial class TableBorder
/// <summary>
/// Gets the safe border for this border or <c>null</c> if none exist.
/// </summary>
public virtual TableBorder? SafeBorder { get; }
public virtual TableBorder? SafeBorder { get; } = null;
/// <summary>
/// Gets a value indicating whether the border supports row separators or not.
/// </summary>
public virtual bool SupportsRowSeparator { get; } = true;
/// <summary>
/// Gets the string representation of a specified table border part.
@@ -81,6 +86,11 @@ public abstract partial class TableBorder
(GetPart(TableBorderPart.HeaderBottomLeft), GetPart(TableBorderPart.HeaderBottom),
GetPart(TableBorderPart.HeaderBottomSeparator), GetPart(TableBorderPart.HeaderBottomRight)),
// Separator between header and cells
TablePart.RowSeparator =>
(GetPart(TableBorderPart.RowLeft), GetPart(TableBorderPart.RowCenter),
GetPart(TableBorderPart.RowSeparator), GetPart(TableBorderPart.RowRight)),
// Separator between footer and cells
TablePart.FooterSeparator =>
(GetPart(TableBorderPart.FooterTopLeft), GetPart(TableBorderPart.FooterTop),