Skip to main content
Bar

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

BarItem.ImageIndexDisabled Property

Gets or sets the index of the image displayed within corresponding links when they are disabled. This property is obsolete. Use the BarItem.ImageOptions.DisabledImageIndex property instead.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual int ImageIndexDisabled { get; set; }

#Property Value

Type Description
Int32

An integer value specifying the image by its zero-based index within the source collection. -1 implies that the image is not set.

#Remarks

You can disable links associated with an item by setting the BarItem.Enabled property of the item to false. By default, if an image is assigned to the item, its color saturation is automatically decreased when links become disabled. (Images can be assigned to items via the BarItem.ImageOptions.ImageIndex and BarItem.ImageOptions.Image properties). However, you can specify a custom image displayed within disabled links. Use the ImageIndexDisabled property for this purpose.

The ImageIndexDisabled property specifies the image by its zero-based index within the source collection. The source of images is specified by the BarManager.Images property of the BarManager.

You can also specify the image displayed within disabled links directly (avoiding the need to add it to an image list). This can be done using the BarItem.GlyphDisabled property of the item.

The image below shows you bars with enabled and disabled links painted using the default mechanism.

LinkImages - SmallDisabledStandard

The next image displays the same bars. Custom images are assigned to disabled links.

LinkImages - SmallDisabledCustom

Note: settings of the BarItem.GlyphDisabled property override settings of the BarItem.ImageOptions.DisabledImageIndex property.

See Also