Class ListControlItem
Custom item for ListBox, ComboBox and other list controls. This class has Text, Value and other properties which allow to customize look of the item.
public class ListControlItem : BaseControlItem, IBaseObjectWithId, IBaseObject
- Inheritance
-
ListControlItem
- Implements
- Derived
Constructors
- ListControlItem()
Initializes a new instance of the ListControlItem class.
- ListControlItem(string)
Initializes a new instance of the ListControlItem class with the default value for the Text property.
- ListControlItem(string, Action?)
Initializes a new instance of the ListControlItem class with the default value for the Text property and an action associated with the item.
- ListControlItem(string, object?)
Initializes a new instance of the ListControlItem class with the default values for the Text and Value properties.
Fields
- DefaultItemAlignment
Gets default item alignment
- DrawDebugCornersOnElements
Gets or sets whether to draw debug corners around item elements (image, text, etc.).
- NullContainerId
Gets id of the null container.
Properties
- Action
Gets or sets Action associated with this ListControlItem instance.
- Alignment
Gets or sets alignment of the item.
- BackgroundColor
Gets or sets background color of the item.
- Border
Gets or sets border of the item.
- CanRemove
Gets or sets whether item can be removed.
- CheckBoxAllowAllStatesForUser
Gets or sets whether user can set the checkbox to the third state by clicking. If property is null (default), control's setting is used.
- CheckBoxThreeState
Gets or sets a value indicating whether checkbox will allow three check states rather than two. If property is null (default), control's setting is used.
- CheckBoxVisible
Gets or sets whether to show check box inside the item. This property (if specified) overrides global checkboxes visibility setting in the control.
- CheckState
Gets or sets state of the check box associated with the item.
- DisabledImage
Gets or sets disabled Image associated with the item.
- DisplayText
Gets or sets text for the display purposes.
- DoubleClickAction
Gets or sets Action which is executed on mouse double click.
- DrawBackgroundAction
Gets or sets an action which is called when background is painted for the item. When this action is specified, default background painting is not performed.
- DrawForegroundAction
Gets or sets an action which is called when foreground is painted for the item. When this action is specified, default foreground painting is not performed.
- ForegroundColor
Gets or sets foreground color of the item.
- HideFocusRect
Gets or sets whether to hide focus rectangle for this item.
- HideSelection
Gets or sets whether to hide selection for this item.
- HorizontalAlignment
Gets or sets horizontal alignment of the item.
- ImageIndex
Gets or sets image index used when item is painted.
- LabelFlags
Gets or sets draw label flags.
- MinHeight
Gets or sets minimal item height.
- SelectedImage
Gets or sets Image associated with the item when it is selected.
- SvgImageHeight
Gets or sets height of the svg image.
- SvgImageSize
Gets or sets size of the svg image.
- SvgImageWidth
Gets or sets width of the svg image.
- Text
Gets or sets text which is displayed when item is painted.
- TextHasBold
Gets or sets whether text may contain html bold tags.
- VerticalAlignment
Gets or sets vertical alignment of the item.
Methods
- Assign(ListControlItem)
Assigns properties of this object from the properties of another object.
- CalcForegroundMetrics(IListControlItemContainer?, ListBoxItemPaintEventArgs)
Default method which calls DefaultDrawForeground(IListControlItemContainer?, ListBoxItemPaintEventArgs) for the LabelMetrics calculation.
- Clone()
Creates a copy of this object.
- DefaultDrawBackground(IListControlItemContainer?, ListBoxItemPaintEventArgs)
Draws default background for the item.
- DefaultDrawForeground(IListControlItemContainer?, ListBoxItemPaintEventArgs)
Default method which draws item foreground.
- DefaultMeasureItemSize(IListControlItemContainer, Graphics, int)
Default method which measures item size.
- DrawBackground(IListControlItemContainer?, ListBoxItemPaintEventArgs)
Draws item background;
- DrawForeground(IListControlItemContainer?, ListBoxItemPaintEventArgs)
Draws item foreground.
- GetAlignment(ListControlItem?, IListControlItemContainer?)
Gets item alignment.
- GetAllowThreeState(IListControlItemContainer?)
Gets whether three state checkbox is allowed in the item.
- GetCheckState(IListControlItemContainer?)
Gets CheckState of the item using GetAllowThreeState(IListControlItemContainer?) and CheckState.
- GetContainerFont(IListControlItemContainer?)
Gets font of the container.
- GetContainerForegroundColor(IListControlItemContainer?)
Gets foreground color of the container.
- GetDisabledTextColor(ListControlItem?, IListControlItemContainer?)
Gets disabled item text color.
- GetFont(IListControlItemContainer?)
Gets font used when item is painted. Result is not
null
.
- GetFont(ListControlItem?, IListControlItemContainer?)
Gets font when item is inside the specified container. Result must not be
null
.
- GetImage(VisualControlState, bool?)
Gets image for the specified item state and light/dark theme flag.
- GetItemImageRect(RectD, SizeD?)
Gets suggested rectangles of the item's image and text.
- GetItemImages(ListControlItem?, IListControlItemContainer?, Color?)
Gets item images.
- GetItemTextColor(ListControlItem?, IListControlItemContainer?)
Gets item text color when item is inside the spedified container.
- GetMinHeight(ListControlItem?, IListControlItemContainer?)
Gets item minimal height.
- GetSelectedItemBackColor(ListControlItem?, IListControlItemContainer?)
Gets selected item back color.
- GetSelectedTextColor(ListControlItem?, IListControlItemContainer?)
Gets selected item text color when item is inside the spedified container.
- GetShowCheckBox(IListControlItemContainer?)
Gets whether checkbox is shown in the item.
- GetTextColor(IListControlItemContainer?)
Gets item text color when item is inside the spedified container.
- HasImage(VisualControlState, bool?)
Gets whether item has image for the specified item state and light/dark theme flag.
- IsContainerDark(IListControlItemContainer?)
Gets whether container is using dark color theme.
- IsContainerEnabled(IListControlItemContainer?)
Gets whether container is enabled.
- IsSelected(IListControlItemContainer?)
Gets whether item is selected.
- SetImage(VisualControlState, Image?, bool?)
Sets image for the specified color theme light/dark theme flag.
- SetLabelFlag(DrawLabelFlags, bool)
Turns on or off LabelFlags element(s).
- SetSelected(IListControlItemContainer?, bool)
Sets whether item is selected.
- SetValue(object?)
Sets Value property.
- ToString()
Returns a string that represents the current object.
- ToggleSelected(IListControlItemContainer?)
Toggles selected state of the item.