Class ButtonColorSet
- Namespace
- SharpConsoleUI.Core
- Assembly
- SharpConsoleUI.dll
Immutable record representing a color set for a button control.
public record ButtonColorSet : IEquatable<ButtonColorSet>
- Inheritance
-
ButtonColorSet
- Implements
- Inherited Members
Properties
BackgroundColor
Gets the background color for the button.
public Color BackgroundColor { get; init; }
Property Value
- Color
ForegroundColor
Gets the foreground (text) color for the button.
public Color ForegroundColor { get; init; }
Property Value
- Color
IsEnabled
Gets a value indicating whether the button is enabled.
public bool IsEnabled { get; init; }
Property Value
IsFocused
Gets a value indicating whether the button is focused.
public bool IsFocused { get; init; }
Property Value
Methods
FromTheme(ITheme, bool, bool)
Creates a ButtonColorSet from a theme based on button state.
public static ButtonColorSet FromTheme(ITheme theme, bool isFocused, bool isEnabled)
Parameters
themeIThemeThe theme to derive colors from.
isFocusedboolWhether the button is currently focused.
isEnabledboolWhether the button is enabled.
Returns
- ButtonColorSet
A new ButtonColorSet with the appropriate colors.