HeaderBar
ConsoleMonster.Widgets
The one header bar of every full-screen surface (dashboards, the Shell app, full-screen forms, runs started from a menu): a row on the Surface band with the title in SurfaceAccent, then the breadcrumb or a subtitle, and on the right a status (with its marker), free text and the elapsed clock. Without colour the band is left out and the same text is drawn plain. See Docs/Design-System.md.
Inheritance
- object
- HeaderBar
Usage
Explore 40 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 19
- Method Ui.HeaderBar
- Extension method HeaderBar.Crumb
- Extension method HeaderBar.Crumbs
- Extension method HeaderBar.Detail
- Extension method HeaderBar.Elapsed
- Extension method HeaderBar.HeaderRight
- Extension method HeaderBar.ShowElapsed
- Extension method HeaderBar.Status
- Extension method HeaderBar.Subtitle
- Extension method HeaderBar.Title
- Method HeaderBarFluent.Crumb
- Method HeaderBarFluent.Crumbs
- Method HeaderBarFluent.Detail
- Method HeaderBarFluent.Elapsed
- Method HeaderBarFluent.HeaderRight
- Method HeaderBarFluent.ShowElapsed
- Method HeaderBarFluent.Status
- Method HeaderBarFluent.Subtitle
- Method HeaderBarFluent.Title
Accepted by parameters 21
- Method ContentBuilder.HeaderBar
- Method ContentBuilder.HeaderBar
- Method Ui.HeaderBar
- Extension method HeaderBar.Crumb
- Extension method HeaderBar.Crumbs
- Extension method HeaderBar.Detail
- Extension method HeaderBar.Elapsed
- Extension method HeaderBar.HeaderRight
- Extension method HeaderBar.ShowElapsed
- Extension method HeaderBar.Status
- Extension method HeaderBar.Subtitle
- Extension method HeaderBar.Title
- Method HeaderBarFluent.Crumb
- Method HeaderBarFluent.Crumbs
- Method HeaderBarFluent.Detail
- Method HeaderBarFluent.Elapsed
- Method HeaderBarFluent.HeaderRight
- Method HeaderBarFluent.ShowElapsed
- Method HeaderBarFluent.Status
- Method HeaderBarFluent.Subtitle
- Method HeaderBarFluent.Title
Constructors
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
public IList<string> Crumbs { get; } #Breadcrumb steps after the title, plain text ("Tasks", "Review & run"). Left empty inside an app with AppScreens, the bar shows the open screens.
public string? Subtitle { get; set; } #A subtitle after the title, separated by a dot (markup).
public StatusKind? Status { get; set; } #The status kind; its marker goes before the status text.
public string? HeaderRight { get; set; } #Plain text on the right, before the clock (an app's subtitle, a step count).
public TimeSpan? Elapsed { get; set; } #The clock value; null uses the render context's elapsed time.
Extension Methods
public static HeaderBar Crumb(HeaderBar headerBar, string item) #Adds an item to HeaderBar.Crumbs: Breadcrumb steps after the title, plain text ("Tasks", "Review & run"). Left empty inside an app with AppScreens, the bar shows the open screens.
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- item string
- The item.
public static HeaderBar Crumbs(HeaderBar headerBar, IEnumerable<string> items) #Adds items to HeaderBar.Crumbs: Breadcrumb steps after the title, plain text ("Tasks", "Review & run"). Left empty inside an app with AppScreens, the bar shows the open screens.
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
public static HeaderBar Detail(HeaderBar headerBar, string? value) #Sets HeaderBar.Detail: Status text on the right (markup).
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
headerBar.Detail = value; Ui.HeaderBar().Detail(value);public static HeaderBar Elapsed(HeaderBar headerBar, TimeSpan? value) #Sets HeaderBar.Elapsed: The clock value; null uses the render context's elapsed time.
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- value System.TimeSpan?
- The value.
Examples
// C# initializer or property // C# fluent
headerBar.Elapsed = value; Ui.HeaderBar().Elapsed(value);public static HeaderBar HeaderRight(HeaderBar headerBar, string? value) #Sets HeaderBar.HeaderRight: Plain text on the right, before the clock (an app's subtitle, a step count).
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
headerBar.HeaderRight = value; Ui.HeaderBar().HeaderRight(value);public static HeaderBar ShowElapsed(HeaderBar headerBar, bool value = true) #Sets HeaderBar.ShowElapsed: Shows the elapsed clock on the right.
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
headerBar.ShowElapsed = value; Ui.HeaderBar().ShowElapsed(value);public static HeaderBar Status(HeaderBar headerBar, StatusKind? value) #Sets HeaderBar.Status: The status kind; its marker goes before the status text.
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- value ConsoleMonster.Styling.StatusKind?
- The value.
Examples
// C# initializer or property // C# fluent
headerBar.Status = value; Ui.HeaderBar().Status(value);public static HeaderBar Subtitle(HeaderBar headerBar, string? value) #Sets HeaderBar.Subtitle: A subtitle after the title, separated by a dot (markup).
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
headerBar.Subtitle = value; Ui.HeaderBar().Subtitle(value);public static HeaderBar Title(HeaderBar headerBar, string value) #Sets HeaderBar.Title: The title (markup).
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
headerBar.Title = value; Ui.HeaderBar().Title(value);