Class PanelBuilder
- Namespace
- SharpConsoleUI.Panel
- Assembly
- SharpConsoleUI.dll
Fluent builder for constructing Panel instances.
public class PanelBuilder
- Inheritance
-
PanelBuilder
- Inherited Members
- Extension Methods
Methods
Build()
Builds the panel with the configured settings.
public Panel Build()
Returns
- Panel
A new Panel instance.
Center(IPanelElement)
Adds a single element to the center zone.
public PanelBuilder Center(IPanelElement element)
Parameters
elementIPanelElement
Returns
Center(IPanelElementBuilder)
Adds a single builder's element to the center zone.
public PanelBuilder Center(IPanelElementBuilder builder)
Parameters
builderIPanelElementBuilder
Returns
Center(params object[])
Adds elements to the center zone. Accepts IPanelElement or IPanelElementBuilder instances.
public PanelBuilder Center(params object[] items)
Parameters
itemsobject[]
Returns
Left(IPanelElement)
Adds a single element to the left zone.
public PanelBuilder Left(IPanelElement element)
Parameters
elementIPanelElement
Returns
Left(IPanelElementBuilder)
Adds a single builder's element to the left zone.
public PanelBuilder Left(IPanelElementBuilder builder)
Parameters
builderIPanelElementBuilder
Returns
Left(params object[])
Adds elements to the left zone. Accepts IPanelElement or IPanelElementBuilder instances.
public PanelBuilder Left(params object[] items)
Parameters
itemsobject[]
Returns
Right(IPanelElement)
Adds a single element to the right zone.
public PanelBuilder Right(IPanelElement element)
Parameters
elementIPanelElement
Returns
Right(IPanelElementBuilder)
Adds a single builder's element to the right zone.
public PanelBuilder Right(IPanelElementBuilder builder)
Parameters
builderIPanelElementBuilder
Returns
Right(params object[])
Adds elements to the right zone. Accepts IPanelElement or IPanelElementBuilder instances.
public PanelBuilder Right(params object[] items)
Parameters
itemsobject[]
Returns
Visible(bool)
Sets whether the panel is visible.
public PanelBuilder Visible(bool visible = true)
Parameters
visibleboolTrue to show the panel.
Returns
- PanelBuilder
This builder for chaining.
WithBackgroundColor(Color)
Sets the panel background color.
public PanelBuilder WithBackgroundColor(Color color)
Parameters
colorColorThe background color.
Returns
- PanelBuilder
This builder for chaining.
WithForegroundColor(Color)
Sets the panel foreground color.
public PanelBuilder WithForegroundColor(Color color)
Parameters
colorColorThe foreground color.
Returns
- PanelBuilder
This builder for chaining.