All docs
V21.2
21.2
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

XtraBaseArgs.HtmlImages Property

Gets or sets ImageCollection or SvgImageCollection. XtraMessageBox can display images from this collection.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v21.2.dll

Declaration

public object HtmlImages { get; set; }

Property Value

Type Description
Object

An object that is an image collection.

Remarks

XtraMessageBox messages support HTML tags and can display images from ImageCollection or SvgImageCollection.

XtraMessageBoxImage

To display an image, allow HTML text(via the AllowHtmlText property) and assign an image collection to HtmlImages. Then add the “Image” tag to the Text and specify an image from a collection:

XtraMessageBoxArgs args = new XtraMessageBoxArgs();
args.AllowHtmlText = DevExpress.Utils.DefaultBoolean.True;
args.HtmlImages = htmlImageCollection;
args.Caption = "Message";
args.Text = "<image=img.png>Text";
XtraMessageBox.Show(args);

You can combine “image” with other HTML tags, for example the <p> tag, available for v20.1 and newer. This tag supports the “align” parameter that allows you to arrange an image as needed.

image

XtraMessageBoxArgs args = new XtraMessageBoxArgs();
args.AllowHtmlText = DefaultBoolean.True;
svgImageCollection1.ImageSize = new Size(48, 48);
args.HtmlImages = svgImageCollection1;
args.Text = "<p align=center><image=warning><br>" +
    "<b>Something went wrong</b><br>" +
    "We're having technical issues at the moment.<br>" +
    "Please try again later.</p>";
args.Caption = "Warning";
args.Buttons = new DialogResult[] { DialogResult.OK };
XtraMessageBox.Show(args);

You can also add an Icon to the message body.

See Also