Skip to content
ConsoleMonster
Cmdlet

New-ConsoleStack

Module ConsoleMonster
Inputs
ConsoleMonster.Layout.IWidget[]
Outputs
ConsoleMonster.Layout.IWidget

Layers console widgets on top of each other in the same space.

Syntax

New-ConsoleStack [[-Content] <ScriptBlock>] [-Fill] [-Height <Int32>] [-Weight <Double>] [-Widget <IWidget[]>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Layers console widgets on top of each other in the same space.

Each widget the scriptblock emits is a layer, bottom first; later layers paint over earlier ones and replace only the cells they write. Combine with New-ConsoleAlign to place an overlay, such as a badge in a corner of a chart. To place widgets one below another, use New-ConsoleRows.

Examples

Authored help example

EXAMPLE 1

New-ConsoleStack -Content { }

Parameters

-Content ScriptBlock optionalposition: 0
Scriptblock that emits the layers, bottom first.
-Fill SwitchParameter optional
Take the remaining height of a live dashboard.
-Height Int32 optional
Fixed height in rows.
-Weight Double optional
Share of the width (in columns) or height (in a live dashboard) this widget takes.
-Widget IWidget[] optionalpipeline: True (ByValue)
Layers to use instead of, or after, the scriptblock 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.