Back to Devexpress

NavBarControl.HtmlImages Property

windowsforms-devexpress-dot-xtranavbar-dot-navbarcontrol-8c9fa2b0.md

latest2.9 KB
Original Source

NavBarControl.HtmlImages Property

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

Namespace : DevExpress.XtraNavBar

Assembly : DevExpress.XtraNavBar.v25.2.dll

NuGet Package : DevExpress.Win

Declaration

csharp
[DefaultValue(null)]
[DXCategory("Appearance")]
public object HtmlImages { get; set; }
vb
<DefaultValue(Nothing)>
<DXCategory("Appearance")>
Public Property HtmlImages As Object

Property Value

TypeDefaultDescription
Objectnull

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

|

Remarks

Enable the NavBarControl.AllowHtmlString property to use a set of HTML-inspired tags to format group and item captions (Caption).

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

  • C#

  • VB.NET

csharp
navBarControl1.AllowHtmlString = true;
navBarControl1.HtmlImages = imageCollection1;
navBarGroup1.Caption = "Settings <image=settings.png>";
vb
navBarControl1.AllowHtmlString = True
navBarControl1.HtmlImages = imageCollection1
navBarGroup1.Caption = "Settings <image=settings.png>"

See HTML Text Formatting to learn more.

See Also

AllowHtmlString

HTML-inspired Text Formatting

SmallImages

LargeImages

NavBarControl Class

NavBarControl Members

DevExpress.XtraNavBar Namespace