Back to Devexpress

XtraMessageBoxArgs.Icon Property

windowsforms-devexpress-dot-xtraeditors-dot-xtramessageboxargs-231320f4.md

latest2.2 KB
Original Source

XtraMessageBoxArgs.Icon Property

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

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public Icon Icon { get; set; }
vb
<Browsable(False)>
<EditorBrowsable(EditorBrowsableState.Never)>
Public Property Icon As Icon

Property Value

TypeDescription
Icon

An Icon object that specifies the message box icon.

|

Remarks

The following code snippet adds an icon to an XtraMessageBox.

csharp
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);
vb
Imports DevExpress.XtraEditors
Imports System.Drawing
Imports System.Windows.Forms
' ...
Dim args As New XtraMessageBoxArgs()
' ...
args.Icon = New Icon("D:\Warning_16x16.ico")
XtraMessageBox.Show(args)

The following image demonstrates the result.

Alternatively, you can use HtmlImages.

See Also

XtraMessageBoxArgs Class

XtraMessageBoxArgs Members

DevExpress.XtraEditors Namespace