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

XtraMessageBoxArgs.Icon Property

Use the XtraMessageBoxArgs.ImageOptions property to display an image in a message box.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public Icon Icon { get; set; }

#Property Value

Type Description
Icon

An Icon object that specifies the message box icon.

#Remarks

The following code snippet adds an icon to an XtraMessageBox.

using DevExpress.XtraEditors;
using System.Drawing;
using System.Windows.Forms;
// ...
XtraMessageBoxArgs args = new XtraMessageBoxArgs();
// ...
args.Icon = new Icon(@"D:\Warning_16x16.ico");
XtraMessageBox.Show(args);

The following image demonstrates the result.

MessageBoxIcon

Alternatively, you can use HtmlImages.

See Also