Class TrinityLayout<T>
- Namespace
- AbanoubNassem.Trinity.Components.TrinityLayout
- Assembly
- AbanoubNassem.Trinity.dll
Defines an abstract class for a Trinity layout component that inherits from TrinityComponent, implements ITrinityLayout, and IFormComponent.
public abstract class TrinityLayout<T> : TrinityComponent<T, object?>, ITrinityLayout, ITrinityComponent, IHasSchema, IFormComponent where T : TrinityLayout<T>
Type Parameters
T
The type of the Trinity layout component.
- Inheritance
-
TrinityLayout<T>
- Implements
- Derived
- Inherited Members
Constructors
TrinityLayout(List<IFormComponent>, int?)
Initializes a new instance of the TrinityLayout class with the specified schema and number of columns to span to.
protected TrinityLayout(List<IFormComponent> schema, int? columns = null)
Parameters
schema
List<IFormComponent>The schema of the Trinity layout component.
columns
int?The number of columns in the Trinity layout component can span to.
Properties
Columns
Gets or sets The number of columns in the Trinity layout component can span to.
public int? Columns { get; protected set; }
Property Value
- int?
ColumnSpan
Gets or sets the column span of the layout.
public override int ColumnSpan { get; protected set; }
Property Value
Schema
Gets or sets the schema for the component.
public List<object>? Schema { get; set; }
Property Value
Remarks
The schema can be a list of objects of any ITrinityComponent.
Type
Used on the front-end side to determine what type is the component , is it (field, columns , etc).
public override string Type { get; }
Property Value
Methods
SetColumns(int)
Sets The number of columns in the Trinity layout component can span to.
public T SetColumns(int columns)
Parameters
columns
intThe number of columns in the Trinity layout component can span to.
Returns
- T
The current instance of the
T
layout.
SetSchema(List<IFormComponent>)
Sets the schema of the layout component and returns the layout.
public T SetSchema(List<IFormComponent> schema)
Parameters
schema
List<IFormComponent>The schema of the layout component.
Returns
- T
The current instance of the
T
layout.