API Reference
HeaderBar
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 36 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 18
- Extension method HeaderBar.AddCrumb
- Extension method HeaderBar.AddCrumbs
- Extension method HeaderBar.WithClock
- Extension method HeaderBar.WithRight
- Extension method HeaderBar.WithShowClock
- Extension method HeaderBar.WithStatus
- Extension method HeaderBar.WithStatusLevel
- Extension method HeaderBar.WithSubtitle
- Extension method HeaderBar.WithTitle
- Method HeaderBarFluent.AddCrumb
- Method HeaderBarFluent.AddCrumbs
- Method HeaderBarFluent.WithClock
- Method HeaderBarFluent.WithRight
- Method HeaderBarFluent.WithShowClock
- Method HeaderBarFluent.WithStatus
- Method HeaderBarFluent.WithStatusLevel
- Method HeaderBarFluent.WithSubtitle
- Method HeaderBarFluent.WithTitle
Accepted by parameters 18
- Extension method HeaderBar.AddCrumb
- Extension method HeaderBar.AddCrumbs
- Extension method HeaderBar.WithClock
- Extension method HeaderBar.WithRight
- Extension method HeaderBar.WithShowClock
- Extension method HeaderBar.WithStatus
- Extension method HeaderBar.WithStatusLevel
- Extension method HeaderBar.WithSubtitle
- Extension method HeaderBar.WithTitle
- Method HeaderBarFluent.AddCrumb
- Method HeaderBarFluent.AddCrumbs
- Method HeaderBarFluent.WithClock
- Method HeaderBarFluent.WithRight
- Method HeaderBarFluent.WithShowClock
- Method HeaderBarFluent.WithStatus
- Method HeaderBarFluent.WithStatusLevel
- Method HeaderBarFluent.WithSubtitle
- Method HeaderBarFluent.WithTitle
Constructors
public HeaderBar(String title) #Creates a header bar.
Parameters
- title System.String
- The title (markup).
Methods
public Size Measure(Constraints constraints, RenderContext context) #SizeReturns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Returns
The desired size, never larger than the constraints.
public Void Render(Region region, RenderContext context) #VoidRenders 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
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public IList<String> Crumbs { get; } #Breadcrumb steps after the title, plain text ("Tasks", "Review & run").
public String? Subtitle { get; set; } #A subtitle after the title, separated by a dot (markup).
public StatusKind? StatusLevel { get; set; } #The status kind; its marker goes before the status text.
public String? Right { get; set; } #Plain text on the right, before the clock (an app's subtitle, a step count).
public TimeSpan? Clock { get; set; } #The clock value; null uses the render context's elapsed time.
Extension Methods
public static HeaderBar AddCrumb(HeaderBar headerBar, String item) #HeaderBarAdds an item to HeaderBar.Crumbs: Breadcrumb steps after the title, plain text ("Tasks", "Review & run").
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- item System.String
- The item.
Returns
The same instance.
public static HeaderBar AddCrumbs(HeaderBar headerBar, params String[] items) #HeaderBarAdds items to HeaderBar.Crumbs: Breadcrumb steps after the title, plain text ("Tasks", "Review & run").
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- items System.String[]
- The items, in order.
Returns
The same instance.
public static HeaderBar AddCrumbs(HeaderBar headerBar, IEnumerable<String> items) #HeaderBarAdds items to HeaderBar.Crumbs: Breadcrumb steps after the title, plain text ("Tasks", "Review & run").
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- items System.Collections.Generic.IEnumerable<System.String>
- The items, in order.
Returns
The same instance.
public static HeaderBar WithClock(HeaderBar headerBar, TimeSpan? value) #HeaderBarSets HeaderBar.Clock: The clock value; null uses the render context's elapsed time.
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- value System.TimeSpan?
- The value.
Returns
The same instance.
public static HeaderBar WithRight(HeaderBar headerBar, String? value) #HeaderBarSets HeaderBar.Right: Plain text on the right, before the clock (an app's subtitle, a step count).
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- value System.String?
- The value.
Returns
The same instance.
public static HeaderBar WithShowClock(HeaderBar headerBar, Boolean value = true) #HeaderBarSets HeaderBar.ShowClock: Shows the elapsed clock on the right.
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- value System.Boolean = true
- The value (default true).
Returns
The same instance.
public static HeaderBar WithStatus(HeaderBar headerBar, String? value) #HeaderBarSets HeaderBar.Status: Status text on the right (markup).
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- value System.String?
- The value.
Returns
The same instance.
public static HeaderBar WithStatusLevel(HeaderBar headerBar, StatusKind? value) #HeaderBarSets HeaderBar.StatusLevel: The status kind; its marker goes before the status text.
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- value ConsoleMonster.Styling.StatusKind?
- The value.
Returns
The same instance.
public static HeaderBar WithSubtitle(HeaderBar headerBar, String? value) #HeaderBarSets HeaderBar.Subtitle: A subtitle after the title, separated by a dot (markup).
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- value System.String?
- The value.
Returns
The same instance.
public static HeaderBar WithTitle(HeaderBar headerBar, String value) #HeaderBarSets HeaderBar.Title: The title (markup).
Parameters
- headerBar ConsoleMonster.Widgets.HeaderBar
- The instance.
- value System.String
- The value.
Returns
The same instance.