Table of Contents

Class StartMenuElementBuilder

Namespace
SharpConsoleUI.Panel.Builders
Assembly
SharpConsoleUI.dll

Fluent builder for StartMenuElement.

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

Methods

Build()

Builds and returns the configured panel element.

public IPanelElement Build()

Returns

IPanelElement

WithColors(Color, Color)

Sets the button colors.

public StartMenuElementBuilder WithColors(Color fg, Color bg)

Parameters

fg Color
bg Color

Returns

StartMenuElementBuilder

WithName(string)

Sets the element name.

public StartMenuElementBuilder WithName(string name)

Parameters

name string

Returns

StartMenuElementBuilder

WithOptions(StartMenuOptions)

Sets the start menu options (layout, colors, categories, etc.).

public StartMenuElementBuilder WithOptions(StartMenuOptions options)

Parameters

options StartMenuOptions

Returns

StartMenuElementBuilder

WithShortcutKey(ConsoleKey, ConsoleModifiers)

Sets the keyboard shortcut for toggling this start menu.

public StartMenuElementBuilder WithShortcutKey(ConsoleKey key, ConsoleModifiers modifiers = ConsoleModifiers.Control)

Parameters

key ConsoleKey
modifiers ConsoleModifiers

Returns

StartMenuElementBuilder

WithText(string)

Sets the button text.

public StartMenuElementBuilder WithText(string text)

Parameters

text string

Returns

StartMenuElementBuilder