Color legend plain property dependency property method
The style class of ListBox: the properties a style can set on it. Part style ScrollableContainerStyle. Leaves out SelectedItem, SelectedIndex and ItemsSource. Framework defaults: InheritState.FromChildren, BackgroundColor DefaultListBoxBackgroundColor, AlternativeItemColor, HoverItemColor, PressedItemColor and SelectedItemColor from their DefaultListBox settings, ItemHeight DefaultListBoxItemHeight (24). NormalItemColor stays transparent.
A class deriving from BaseStyle. The styles page shows it in context.
Names are colored by what they are: a property, a method or an event; values and fields keep the plain color.
Properties
AlternativeItemColor 🠆
Color · The background of the odd unselected rows while UseDualColors is set. (240, 240, 245) unless set (DefaultSettings.DefaultListBoxAlternativeItemColor).
HoverItemColor 🠆
Color? · The background of the row under the mouse. When null the row keeps its normal or selected color. (220, 232, 245) unless set (DefaultSettings.DefaultListBoxHoverItemColor).
ItemHeight 🠆
int · The height of every row in Fixed mode, in units. 24 unless set (DefaultSettings.DefaultListBoxItemHeight); Fixed mode has no effect while it is 0 or less.
NormalItemColor 🠆
Color · The background of an unselected row (of the even rows with UseDualColors). Transparent unless set, so the rows lie on the list’s background.
PressedItemColor 🠆
Color? · The background of a row while the left button is pressed on it. When null it doesn’t change. (160, 190, 225) unless set (DefaultSettings.DefaultListBoxPressedItemColor).
ScrollableContainerStyle 🠆
ScrollableContainerStyle · The style of the scrollable container around the rows, for example its scroll bars and their thickness. Unless set, the container has its own defaults: a scroll bar wherever the rows need one, 12 units thick.
SelectedItemColor 🠆
Color? · The background of a selected row. When null a selected row keeps the color it had. (190, 215, 240) unless set (DefaultSettings.DefaultListBoxSelectedItemColor).
SelectionMode 🠆
ListBoxSelectionMode · Whether one row or several rows can be selected. Single by default.
UseDualColors 🠆
bool · Alternates the background of unselected rows: NormalItemColor for even rows, AlternativeItemColor for odd ones, counted without the separators (a separator row lies on the normal color).
VirtualizationMode 🠆
ListBoxVirtualizationMode · Whether every row has an element (None, the default) or only the rows around the view (Fixed).
Methods
ListBoxStyle()
IsSet() 🠆
IsSet(string propertyName) · Whether the property is assigned to this style, so the style applies it. Pass the name with nameof; an unknown name gives false.
| Parameter | Type | Description |
|---|---|---|
propertyName |
string |
The name of a property of the style; nameof keeps it right. |