New-ConsoleBreadcrumb
Creates a breadcrumb for Show-ConsoleApp: a path such as Settings › Network › Proxy, its own or that of an outline's current entry.
Syntax
New-ConsoleBreadcrumb
[-Disabled]
[-Key] <String>
[-OnChange <ScriptBlock>]
[-Segment] <String[]>
[-TabIndex <Int32>]
[<CommonParameters>]#SegmentNew-ConsoleBreadcrumb
[-Ancestor <String[]>]
[-Disabled]
[-Key] <String>
[-OnChange <ScriptBlock>]
-Outline <Object>
[-TabIndex <Int32>]
[<CommonParameters>]#OutlineDescription
The last segment is where you are. With -Outline it follows that outline's current entry, after any -Ancestor segments, and opening a heading in it opens that outline entry. When the row is too narrow the leading segments give way to an ellipsis. It is a focus stop that initial focus skips: Left/Right choose a segment and Enter or a click opens it; the final state holds the last segment opened.
Examples
Example 1
$sections = New-ConsoleOutline -Key Sections -Item 'General', @{ Title = 'Proxy'; Level = 2 }, 'Logging' -CurrentIndex 1
Show-ConsoleApp -Content {
New-ConsoleBreadcrumb -Key Where -Ancestor 'Settings' -Outline $sections
$sections
}Show where the reader is in an outline.
Parameters
- -Disabled SwitchParameter
- Removes the breadcrumb from keyboard focus traversal and pointer input.
- -Key String
- Unique key in the application's state; the value is the last segment opened.
- -OnChange ScriptBlock
- Runs once each time a segment is opened, on the owning input thread. Receives param($Value, $State) and injected $Value, $State and $Control. Output is discarded.
- -Segment String[]
- The segments, outermost first.
- -TabIndex Int32
- Keyboard focus order. Equal values preserve layout declaration order.
- -Ancestor String[]
- Segments shown before the outline's headings, such as the screen or tab name.
- -Outline Object
- The outline whose current entry the breadcrumb shows (New-ConsoleOutline output).
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.