LayoutView.CustomCardCaptionImage Event

Enables custom images to be shown in card captions.

Namespace: DevExpress.XtraGrid.Views.Layout

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

[DXCategory("Appearance")]
public event LayoutViewCardCaptionImageEventHandler CustomCardCaptionImage
<DXCategory("Appearance")>
Public Event CustomCardCaptionImage As LayoutViewCardCaptionImageEventHandler

Event Data

The CustomCardCaptionImage event's data class is LayoutViewCardCaptionImageEventArgs. The following properties provide information specific to this event:

Property Description
CaptionImageLocation Gets or sets the relative position of an image within a card's caption.
CaptionImageVisible Gets or sets whether the image in a card's caption is visible.
Image Gets or sets the image to be displayed within an element. Inherited from CardCaptionImageEventArgs.
ImageIndex Gets or sets the index of the image to be displayed within a visual element. Inherited from CardCaptionImageEventArgs.
ImageList Gets or sets the source collection of images. Inherited from CardCaptionImageEventArgs.
RowHandle Gets the handle of the processed card. Inherited from CardCaptionImageEventArgs.

Remarks

Handle the CustomCardCaptionImage event to display custom images within card captions. The event fires for each card. To identify the card use the event's RowHandle parameter.

Images can be specified in one of two ways:

  • using the event's Image parameter;
  • using the event's ImageIndex parameter that specifies the index of the image to be shown in the card caption.

    By default, the image collection to which the ImageIndex refers is specified by the View's ColumnView.Images collection. However, a custom source for images can be specified using the event's ImageList property.

The Image property takes priority over the ImageIndex property.

See Also