Back to Devexpress

AccordionControlElementBase.ImageIndex Property

windowsforms-devexpress-dot-xtrabars-dot-navigation-dot-accordioncontrolelementbase-c4cb1061.md

latest4.1 KB
Original Source

AccordionControlElementBase.ImageIndex Property

Gets or sets the index of the image (in the AccordionControl.Images collection) displayed in the element header.

Namespace : DevExpress.XtraBars.Navigation

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
public int ImageIndex { get; set; }
vb
<Browsable(False)>
Public Property ImageIndex As Integer

Property Value

TypeDescription
Int32

The index of the image displayed in the element header.

|

Remarks

The ImageIndex property specifies the index of the required image in the image collection (AccordionControl.Images).

It’s also possible to assign an image to the element using the AccordionControlElementBase.Image property.

If images are specified via both the ImageIndex and Image properties, the image assigned to the Image property will be used.

By default, the auto-height feature is enabled for element headers. It adjusts the header height to accommodate the contents (image, text, custom control and context buttons) in their entirety. The AccordionControlElementBase.ImageLayoutMode property allows you to limit the image display height and specify the way the assigned image is scaled.

Tip

You can also assign an image by its name in the collection.

csharp
// The image collection is created and populated with images at design time.
barItem.ImageOptions.Image = imageCollection1["technology_32x32"]; 
// Assign an SVG image in the SvgCollection
// barItem.ImageOptions.SvgImage = svgCollection1["technology_32x32"];
vb
' The image collection is created and populated with images at design time.
barItem.ImageOptions.Image = imageCollection1("technology_32x32")
' Assign an SVG image in the SvgCollection
' barItem.ImageOptions.SvgImage = svgCollection1["technology_32x32"];

Read the following help topic for more information: Access and Use DevExpress Icons in Code.

See Also

Text

HeaderIndent

Image

AccordionControlElementBase.ImageLayoutMode

Images

HeaderControl

ItemContextButtons

GroupContextButtons

AccordionControlElementBase Class

AccordionControlElementBase Members

DevExpress.XtraBars.Navigation Namespace