Skip to main content
Bar

BarItem.ImageIndexDisabled Property

Gets or sets the index of the image displayed within corresponding links when they are disabled.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.1.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.ImageIndex and BarItem.Glyph 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.ImageIndexDisabled property.

See Also