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
namestringThe element name.
Methods
Build()
Builds and returns the configured panel element.
public IPanelElement Build()
Returns
WithClickHandler(Action)
Sets the click handler.
public CustomElementBuilder WithClickHandler(Action handler)
Parameters
handlerAction
Returns
WithFixedWidth(int)
Sets a fixed width.
public CustomElementBuilder WithFixedWidth(int width)
Parameters
widthint
Returns
WithFlexGrow(int)
Sets the flex grow factor.
public CustomElementBuilder WithFlexGrow(int grow)
Parameters
growint
Returns
WithRenderCallback(Action<CharacterBuffer, int, int, int, Color, Color>)
Sets the render callback.
public CustomElementBuilder WithRenderCallback(Action<CharacterBuffer, int, int, int, Color, Color> callback)