12345678910111213141516171819202122 |
- using InABox.Core;
- namespace InABox.DynamicGrid;
- public class DynamicTextColumn : DynamicActionColumn
- {
- public delegate string GetTextDelegate(CoreRow? row);
- public GetTextDelegate Text { get; private set; }
-
- public Alignment Alignment { get; set; }
-
- public DynamicTextColumn(GetTextDelegate text, ActionDelegate? action = null)
- {
- Alignment = Alignment.MiddleCenter;
- Text = text;
- Action = action;
- VerticalHeader = false;
- }
- public override object? Data(CoreRow? row) => Text?.Invoke(row);
- }
|