RTable class
public sealed class RTable : UserControlA read-only table with sorting and selection.
Constructors
RTable()An empty table.
Properties
List<string[]> Rows { get; }The rows, as they are shown.
int SelectedIndex { get; }The selected row (−1: none).
string HeaderKey { get; set; }The theme resource of the header background.
string StripeKey { get; set; }The theme resource of the stripes.
Methods
RTable Columns(params string[] headers)The columns; «:R» right, «:C» center at the end of a header.
string Header(int column)The header of a column (without the alignment suffix).
RTable AddRow(params string[] cells)Adds a row (missing cells are empty).
void Clear()Removes all the rows.
void Select(int row)Selects a row (−1: none) and tells SelectionChanged.
void Sort(int column, bool descending = false)Sorts by a column: by value if every cell is a number, else alphabetically. The selection is lost.
Events
event Action<int> SelectionChangedWhen the selection changes, with the new row.