CellProps.VerticalAlignments debug
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
public readonly struct CellProps(double? width = null!)
|
||||
{
|
||||
public double? Width { get; init; } = width;
|
||||
public TableVerticalAlignmentValues? VerticalAlignment { get; init; } = default;
|
||||
public VerticalAlignments? VerticalAlignment { get; init; } = default;
|
||||
public MergedCell? Merge { get; init; } = default;
|
||||
public TextDirection TextDirection { get; init; } = TextDirection.LeftToRight;
|
||||
|
||||
@@ -24,7 +24,16 @@ public readonly struct CellProps(double? width = null!)
|
||||
{
|
||||
list =
|
||||
[
|
||||
new TableCellVerticalAlignment() { Val = VerticalAlignment ?? TableVerticalAlignmentValues.Center },
|
||||
new TableCellVerticalAlignment()
|
||||
{
|
||||
Val = (VerticalAlignment ?? VerticalAlignments.Center) switch
|
||||
{
|
||||
VerticalAlignments.Top => TableVerticalAlignmentValues.Top,
|
||||
VerticalAlignments.Center => TableVerticalAlignmentValues.Center,
|
||||
VerticalAlignments.Bottom => TableVerticalAlignmentValues.Bottom,
|
||||
_ => throw new NotImplementedException(),
|
||||
}
|
||||
},
|
||||
new TableCellMargin()
|
||||
{
|
||||
TopMargin = new TopMargin() { Width = "0" },
|
||||
@@ -110,4 +119,6 @@ public enum TextDirection
|
||||
BottomToTop,
|
||||
/// <summary> ⇓ ⇓ ⇓ Сверху вниз </summary>
|
||||
TopToBottom,
|
||||
}
|
||||
}
|
||||
|
||||
public enum VerticalAlignments { Top, Center, Bottom }
|
||||
Reference in New Issue
Block a user