Back to Devexpress

BaseImageListBoxControl.GetItemImage(Int32) Method

windowsforms-devexpress-dot-xtraeditors-dot-baseimagelistboxcontrol-dot-getitemimage-x28-system-dot-int32-x29.md

latest2.7 KB
Original Source

BaseImageListBoxControl.GetItemImage(Int32) Method

Gets the image displayed within the specified item.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public virtual Image GetItemImage(
    int index
)
vb
Public Overridable Function GetItemImage(
    index As Integer
) As Image

Parameters

NameTypeDescription
indexInt32

An integer value representing the zero-based index of the item.

|

Returns

TypeDescription
Image

A Image object value specifying the image displayed within the specified item. -1 if no item is found.

|

Remarks

Each ImageListBoxItem can display an image contained within the object represented by the BaseImageListBoxControl.ImageList property. The GetItemImage method allows you to get the image displayed in the specified item. This method can be especially useful when the data source is bound to the control. Note that the method returns -1 if the BaseImageListBoxControl.ImageMember property value is set to String.Empty.

When no data source is bound, you can obtain the image of the specified item using the ImageListBoxItem.ImageOptions property.

See Also

Items

ImageMember

ImageList

ImageOptions

BaseImageListBoxControl Class

BaseImageListBoxControl Members

DevExpress.XtraEditors Namespace