Class
Legend
ConsoleMonster.Widgets
A rich legend laid out in an aligned row-major grid with three-cell gaps.
Inheritance
- object
- Legend
Usage
Explore 8 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 4
- Extension method Legend.AddEntries
- Extension method Legend.AddEntry
- Method LegendFluent.AddEntries
- Method LegendFluent.AddEntry
Accepted by parameters 4
- Extension method Legend.AddEntries
- Extension method Legend.AddEntry
- Method LegendFluent.AddEntries
- Method LegendFluent.AddEntry
Constructors
public Legend(params string[] entries) #Creates a legend from markup entries. Empty entries are omitted.
Parameters
- entries string[]
Methods
public Size Measure(Constraints constraints, RenderContext context) #Returns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public void Render(Region region, RenderContext context) #Renders into a region. The region may be smaller or larger than the measured size.
Parameters
- region ConsoleMonster.Canvas.Region
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Inherited Methods
Properties
Extension Methods
AddEntries 2 overloads
public static Legend AddEntries(Legend legend, params string[] items) #Adds items to Legend.Entries: Markup entries in display order.
Parameters
- legend ConsoleMonster.Widgets.Legend
- The instance.
- items string[]
- The items, in order.
public static Legend AddEntries(Legend legend, IEnumerable<string> items) #Adds items to Legend.Entries: Markup entries in display order.
Parameters
- legend ConsoleMonster.Widgets.Legend
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
public static Legend AddEntry(Legend legend, string item) #Adds an item to Legend.Entries: Markup entries in display order.
Parameters
- legend ConsoleMonster.Widgets.Legend
- The instance.
- item string
- The item.