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

CustomDrawNodeImagesEventArgs.StateImageIndex Property

Gets or sets the index of the state image displayed within the node.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.2.dll

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.TreeList

#Declaration

public int StateImageIndex { get; set; }

#Property Value

Type Description
Int32

An integer value representing the node’s state image’s index.

#Remarks

Initially, the StateImageIndex property contains the zero-based index of the image specified by the node’s TreeListNode.StateImageIndex property. This property can be used in the following ways:

  • read the property value to paint the default image;
  • change the StateImageIndex property value and leave the CustomDrawEventArgs.Handled property set to false. This forces the control to paint the node’s state image using the default mechanism but with a different image.

Assigning values to this property has no effect in the following cases:

  • the control’s TreeList.StateImageList property is a null reference;
  • the assigned value is less than zero or exceeds the available image index.
See Also