windowsforms-devexpress-dot-xtraeditors-dot-xtramessagebox-d7109b14.md
Allows you to specify custom XtraMessageBox icons using predefined icon names.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public static Dictionary<MessageBoxIcon, Icon> Icons { get; }
Public Shared ReadOnly Property Icons As Dictionary(Of MessageBoxIcon, Icon)
| Type | Description |
|---|---|
| Dictionary<MessageBoxIcon, Icon> |
A Dictionary<TKey,TValue><MessageBoxIcon,Icon,> object that stores predefined XtraMessageBox icons.
|
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);
Dim customIcon As New Icon("C:\MyCustomIcon.ico")
XtraMessageBox.Icons(MessageBoxIcon.Exclamation) = customIcon
XtraMessageBox.Show("text", "caption", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation)
See Also