Skip to content

ListBoxItemColorTheme Class

A theme for a ListBox that displays a SadRogue.Primitives.Color object.

C#
[DataContract]
public class ListBoxItemColorTheme : ListBoxItemTheme

Inheritance objectThemeStatesListBoxItemTheme

C#
public ListBoxItemColorTheme()

When false, colored boxes used when drawing the color for (Color, string) tuple will use two characters; otherwise true and only one character is used.

C#
public bool UseSingleCharacterForBox { get; set; }

Draw(ControlBase, Rectangle, object, ControlStates)

Section titled “Draw(ControlBase, Rectangle, object, ControlStates)”

Draws the item in the specified area of the listbox.

C#
public override void Draw(ControlBase control, Rectangle area, object item, ControlStates itemState)

control ControlBase
The control containing a surface to draw on.

area SadRogue.Primitives.Rectangle
The area to draw the item.

item object
The item object.

itemState ControlStates
The state of the item.

Creates a copy of this theme.

C#
public override ListBoxItemTheme Clone()

ListBoxItemTheme
A new theme object.