Skip to main content
A newer version of this page is available. .

XtraMessageBox

The XtraMessageBox replaces the standard Windows Forms message boxes, which do not support DevExpress skins.

DXMessageBox Collage

To display an XtraMessageBox, call the static XtraMessageBox.Show method. The sample code below prevents an application from closing if a user has clicked “No”.


private void Form1_FormClosing(object sender, FormClosingEventArgs e) {
    if (XtraMessageBox.Show("Do you want to quit the application?", "Confirmation", MessageBoxButtons.YesNo) != DialogResult.Yes) {
        e.Cancel = true;
    }
}

In case you need a more complex content message content, use the XtraDialog class instead.

XtraDialog - On 17.2