Table of Contents

Class CustomElementBuilder

Namespace
SharpConsoleUI.Panel.Builders
Assembly
SharpConsoleUI.dll

Fluent builder for CustomElement.

public class CustomElementBuilder : IPanelElementBuilder
Inheritance
CustomElementBuilder
Implements
Inherited Members
Extension Methods

Constructors

CustomElementBuilder(string)

Initializes a new builder with the specified name.

public CustomElementBuilder(string name)

Parameters

name string

The element name.

Methods

Build()

Builds and returns the configured panel element.

public IPanelElement Build()

Returns

IPanelElement

WithClickHandler(Action)

Sets the click handler.

public CustomElementBuilder WithClickHandler(Action handler)

Parameters

handler Action

Returns

CustomElementBuilder

WithFixedWidth(int)

Sets a fixed width.

public CustomElementBuilder WithFixedWidth(int width)

Parameters

width int

Returns

CustomElementBuilder

WithFlexGrow(int)

Sets the flex grow factor.

public CustomElementBuilder WithFlexGrow(int grow)

Parameters

grow int

Returns

CustomElementBuilder

WithRenderCallback(Action<CharacterBuffer, int, int, int, Color, Color>)

Sets the render callback.

public CustomElementBuilder WithRenderCallback(Action<CharacterBuffer, int, int, int, Color, Color> callback)

Parameters

callback Action<CharacterBuffer, int, int, int, Color, Color>

Returns

CustomElementBuilder