Skip to main content

XtraMessageBox.Icons Property

Allows you to specify custom XtraMessageBox icons using predefined icon names.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v25.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public static Dictionary<MessageBoxIcon, Icon> Icons { get; }

Property Value

Type Description
Dictionary<MessageBoxIcon, Icon>

A Dictionary<TKey,TValue><MessageBoxIcon,Icon,> object that stores predefined XtraMessageBox icons.

Remarks

The static Icons collection contains predefined XtraMessageBox icons. To display a custom icon in all XtraMessageBoxes instead of the predefined default icon, use its predefined icon name.

The following code snippet displays a custom exclamation icon in an XtraMessageBox:

Icon customIcon = new Icon("C:\\MyCustomIcon.ico");
XtraMessageBox.Icons[MessageBoxIcon.Exclamation] = customIcon;
XtraMessageBox.Show("text", "caption", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);
See Also