windowsforms-devexpress-dot-xtralayout-dot-layoutcontrolitem-0f659017.md
Gets or sets the index of the icon displayed in the item’s label.
Namespace : DevExpress.XtraLayout
Assembly : DevExpress.XtraLayout.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[Browsable(false)]
[DefaultValue(-1)]
[DXCategory("Appearance")]
[EditorBrowsable(EditorBrowsableState.Never)]
[XtraSerializableProperty]
public virtual int ImageIndex { get; set; }
<Browsable(False)>
<EditorBrowsable(EditorBrowsableState.Never)>
<DXCategory("Appearance")>
<XtraSerializableProperty>
<DefaultValue(-1)>
Public Overridable Property ImageIndex As Integer
| Type | Default | Description |
|---|---|---|
| Int32 | -1 |
An integer value that specifies the index of an icon in an image collection.
|
Use the ImageOptions property to access the following options, which allow you to specify the icon in the layout item’s label:
SvgImageSpecifies a vector image.ImageUriSpecifies a universal resource identifier of an image in the DX Image Gallery.ImageSpecifies a raster image.ImageIndexSpecifies an index of an image in the Images collection.AlignmentSpecifies the alignment of the image in the label.ImageToTextDistanceSpecifies the distance between the label’s text and icon.AllowGlyphSkinning
Specifies whether the icon is filled with the label’s foreground color. This property overrides AllowGlyphSkinning options specified at the level of the parent group/owner control.
Tip
We recommend using gray-scale icons from the DX Image Gallery for best visual results.
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"];
' 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