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

RibbonControl.HtmlImages Property

Gets or sets a collection of images that can be inserted into item captions using the image tag.

Namespace: DevExpress.XtraBars.Ribbon

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DefaultValue(null)]
[DXCategory("Appearance")]
public object HtmlImages { get; set; }

#Property Value

Type Default Description
Object null

An image collection (DevExpress.Utils.ImageCollection or DevExpress.Utils.SvgImageCollection).

#Remarks

Enable the Html text formatting feature (see RibbonControl.AllowHtmlText and BarItem.AllowHtmlText) to format item captions (BarItem.Caption and BarItem.Description) ) with HTML-inspired tags.

When you compose an HTML string, you can use the image tag to insert an image from an image collection and project’s resources into the text.

To insert an image from an image collection, do the following:

  • Create an image collection (ImageCollection or SvgImageCollection) and populate it with images.
  • Assign the collection to the HtmlImages property.
  • When you use the image tag, address a target image by its name (image names can be obtained from the image collection).
ribbonControl1.AllowHtmlText = true;
ribbonControl1.HtmlImages = imageCollection1;
barStaticItem1.Caption = "Person <image=person>";

See HTML Text Formatting to learn more.

See Also