Skip to content

Commit c0c6339

Browse files
Add Horizontal Padding
1 parent 131e404 commit c0c6339

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

sample/Views/News/StoryDataTemplate.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,26 @@ public StoryDataTemplate() : base(CreateGrid)
1818
(Row.Title, 20),
1919
(Row.Description, 20),
2020
(Row.BottomPadding, 1)),
21+
22+
ColumnDefinitions = Columns.Define(
23+
(Column.LeftPadding, 6),
24+
(Column.Content, Star),
25+
(Column.RightPadding, 6)),
2126

2227
Children =
2328
{
2429
new Label { MaxLines = 1, LineBreakMode = LineBreakMode.TailTruncation }
25-
.Row(Row.Title).Top()
30+
.Row(Row.Title).Column(Column.Content).Top()
2631
.Font(size: 16).TextColor(ColorConstants.TextCellTextColor)
2732
.Bind(Label.TextProperty, static (StoryModel m) => m.Title, mode: BindingMode.OneTime),
2833

2934
new Label()
30-
.Row(Row.Description)
35+
.Row(Row.Description).Column(Column.Content)
3136
.Font(size: 13).TextColor(ColorConstants.TextCellDetailColor)
3237
.Bind(Label.TextProperty, static (StoryModel m) => m.Description, mode: BindingMode.OneTime)
3338
}
3439
};
3540

3641
enum Row { Title, Description, BottomPadding }
42+
enum Column { LeftPadding, Content, RightPadding }
3743
}

0 commit comments

Comments
 (0)