Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[Browsable(false)]
public int ImageIndex { get; set; }

#Property Value

Type Description
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.

AccordionControlElement-Image

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.

// 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