Back to Devexpress

HtmlContentControl.HtmlImages Property

windowsforms-devexpress-dot-xtraeditors-dot-htmlcontentcontrol.md

latest3.6 KB
Original Source

HtmlContentControl.HtmlImages Property

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

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

A source of images.

|

Remarks

The `` tag allows you to display an image from the HtmlImages collection and a bound data object (HtmlContentControl.DataContext).

Do the following to display an image from the HtmlImages collection:

html
csharp
Image im = Image.FromFile("c:\\Data\\photo.png");
imageCollection1.AddImage(im, "photo1");
htmlContentControl1.HtmlImages = imageCollection1;
vb
Dim im As Image = Image.FromFile("c:\Data\photo.png")
imageCollection1.AddImage(im, "photo1")
htmlContentControl1.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#L44

csharp
public void Apply(HtmlContentControl control) {
    control.HtmlImages = SvgChatImages.SvgImages;
    control.HtmlTemplate.Set(Html, Css);

See Also

HtmlContentControl Class

HtmlContentControl Members

DevExpress.XtraEditors Namespace