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
WithColors(Color, Color)
Sets the button colors.
public StartMenuElementBuilder WithColors(Color fg, Color bg)
Parameters
Returns
WithName(string)
Sets the element name.
public StartMenuElementBuilder WithName(string name)
Parameters
namestring
Returns
WithOptions(StartMenuOptions)
Sets the start menu options (layout, colors, categories, etc.).
public StartMenuElementBuilder WithOptions(StartMenuOptions options)
Parameters
optionsStartMenuOptions
Returns
WithShortcutKey(ConsoleKey, ConsoleModifiers)
Sets the keyboard shortcut for toggling this start menu.
public StartMenuElementBuilder WithShortcutKey(ConsoleKey key, ConsoleModifiers modifiers = ConsoleModifiers.Control)
Parameters
keyConsoleKeymodifiersConsoleModifiers
Returns
WithText(string)
Sets the button text.
public StartMenuElementBuilder WithText(string text)
Parameters
textstring