Class PaletteItem
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
An item in a CommandPalette (1.x spec §13.3).
public sealed record PaletteItem : IEquatable<PaletteItem>
- Inheritance
-
PaletteItem
- Implements
- Inherited Members
Constructors
PaletteItem(string, Action)
An item in a CommandPalette (1.x spec §13.3).
public PaletteItem(string Label, Action Run)
Parameters
LabelstringThe text that's matched and shown, such as
"Refresh".RunActionCalled on the UI thread after the palette closes, when the item is chosen.
Properties
Detail
Muted text shown after the label, not matched: a group or a command's description.
public string? Detail { get; init; }
Property Value
Hint
Display-only text drawn right-aligned and muted, such as a key: "ctrl+s".
public string? Hint { get; init; }
Property Value
Label
The text that's matched and shown, such as "Refresh".
public string Label { get; init; }
Property Value
Run
Called on the UI thread after the palette closes, when the item is chosen.
public Action Run { get; init; }