Back to Devexpress

BarItem.ImageIndexDisabled Property

windowsforms-devexpress-dot-xtrabars-dot-baritem-8365ed89.md

latest3.7 KB
Original Source

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

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual int ImageIndexDisabled { get; set; }
vb
<Browsable(False)>
<EditorBrowsable(EditorBrowsableState.Never)>
Public Overridable Property ImageIndexDisabled As Integer

Property Value

TypeDescription
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.

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

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

See Also

DisabledImageIndex

ImageIndex

Glyph

Images

ImageOptions

DisabledImageIndex

BarItem Class

BarItem Members

DevExpress.XtraBars Namespace