windowsforms-devexpress-dot-xtraeditors-dot-htmlcontentpopup-1e0dd7bd.md
Gets or sets the source of images to display using `` tags.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(null)]
[DXCategory("Appearance")]
public object HtmlImages { get; set; }
<DefaultValue(Nothing)>
<DXCategory("Appearance")>
Public Property HtmlImages As Object
| Type | Default | Description |
|---|---|---|
| Object | null |
A source of images.
|
The `` tag allows you to display an image from the HtmlImages collection and a bound data object (HtmlContentPopup.DataContext).
Do the following to display an image from the HtmlImages collection:
Create an image collection (for example, ImageCollection, SvgImageCollection, DPIAwareImageCollection, or SharedImageCollection).
Add an image to the image collection and set the image’s name in the collection.
Assign the image collection to the HtmlImages property.
Define the `` tag in HTML markup, and set the tag’s src attribute to the image’s name.
Image im = Image.FromFile("c:\\Data\\photo.png");
imageCollection1.AddImage(im, "photo1");
htmlContentPopup1.HtmlImages = imageCollection1;
Dim im As Image = Image.FromFile("c:\Data\photo.png")
imageCollection1.AddImage(im, "photo1")
htmlContentPopup1.HtmlImages = imageCollection1
See the following topic for more information: HTML Tags - ‘img’ Tag.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the HtmlImages property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-chat-for-net-framework/CS/DevExpress.AI.WinForms.HtmlChat/Resources/Style.cs#L48
public void Apply(HtmlContentPopup popup) {
popup.HtmlImages = SvgChatImages.SvgImages;
popup.HtmlTemplate.Set(Html, Css);
See Also