Back to Devexpress

BaseListBoxControl.ItemHeight Property

windowsforms-devexpress-dot-xtraeditors-dot-baselistboxcontrol-581d022a.md

latest2.1 KB
Original Source

BaseListBoxControl.ItemHeight Property

Gets or sets an item’s height.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(0)]
[DXCategory("Appearance")]
public virtual int ItemHeight { get; set; }
vb
<DXCategory("Appearance")>
<DefaultValue(0)>
Public Overridable Property ItemHeight As Integer

Property Value

TypeDefaultDescription
Int320

An integer value representing an item’s height in pixels.

|

Remarks

If this property is set to 0 , an item’s height is the height of its font plus a small margin to provide some clearance around the items. Use the ItemHeight property to specify a custom item height.

To enable automatic height calculation, follow the instructions in the BaseListBoxControl.ItemAutoHeight topic.

The BaseListBoxControl.MeasureItem event allows you to dynamically set the height for each item. This can be useful, for instance, when you need to change the height of a specific item while other items within the collection retain the default height.

See Also

ItemCount

MeasureItem

ItemAutoHeight

BaseListBoxControl Class

BaseListBoxControl Members

DevExpress.XtraEditors Namespace