Vixen
02b45cc4
csharp
public sealed class DataColumn

One column of a DataGrid.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Accessors are delegates, not property names. A grid that took "Health" and reflected on it would not work trimmed or on iOS, which is the same argument PropertyGrid makes for Vixen.Core.Reflection — and here the caller already has the lambda, so there is nothing to generate.

⚠ A column with no Commit is read-only, and the grid says so by refusing to open an editor rather than by opening one that throws the value away.

Fields and properties (9)

  • public string Header

    What is written at the top.

  • public float Width

    How wide it is, in pixels.

  • public float MinimumWidth

    How narrow a drag may make it.

  • public bool Resizable

    Whether the header may be dragged to resize it.

  • public bool Sortable

    Whether clicking the header sorts by it.

  • public Func<object, object?>? Value

    What to show for a row.

  • public Action<object, string>? Commit

    What to do with an edited cell, or null if the column is read-only.

  • public Action<DataCell, object>? Template

    How to fill a cell, if a string is not enough.

  • public IComparer<object?>? Comparer

    How two values of this column compare, when the default will not do.

Methods (2)

  • public DataColumn(string header, Func<object, object?>? value = null)

    Creates a column.

  • public string TextOf(object item)

    The value for a row, as text.

Used by (9)

  • DataCellVixen.Ui.Controls.Advanced
  • DataGridVixen.Ui.Controls.Advanced
  • DataGridTestsVixen.Ui.Controls.Advanced.Tests
  • DataHeaderCellVixen.Ui.Controls.Advanced
  • BuildSettingsViewVixen.Editor.App
  • DeviceManagerViewVixen.Editor.Debugger
  • KeyBindingsViewVixen.Editor.Ui
  • PluginManagerViewVixen.Editor.App
  • ProfilerViewVixen.Editor.Profiler