-
Notifications
You must be signed in to change notification settings - Fork 0
/
RoboUIGroupedLayout.cs
48 lines (36 loc) · 1.23 KB
/
RoboUIGroupedLayout.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal;
namespace RoboUI
{
public class RoboUIGroupedLayout<TModel>
{
private readonly ICollection<string> properties;
private readonly string title;
internal RoboUIGroupedLayout(string title)
{
properties = new List<string>();
this.title = title;
Column = 1;
}
public int Column { get; set; }
public string CssClass { get; set; }
public bool EnableGrid { get; set; }
public bool EnableScrollbar { get; set; }
public string FormGroupWrapperEndHtml { get; set; }
public string FormGroupWrapperStartHtml { get; set; }
public ICollection<string> Properties => properties;
public string Title => title;
public RoboUIGroupedLayout<TModel> Add(string property)
{
properties.Add(property);
return this;
}
public RoboUIGroupedLayout<TModel> Add<TValue>(Expression<Func<TModel, TValue>> expression)
{
properties.Add(ExpressionHelper.GetExpressionText(expression));
return this;
}
}
}