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

SchedulerControl.CustomizeMessageBoxCaption Event

Allows changing the caption of a built-in message box prompting the user for an action after an error condition has occurred.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v19.1.dll


public event CustomizeMessageBoxCaptionEventHandler CustomizeMessageBoxCaption

Event Data

The CustomizeMessageBoxCaption event's data class is CustomizeMessageBoxCaptionEventArgs. The following properties provide information specific to this event:

Property Description
Caption Gets or sets a string for display in the caption of a message box that prompts the end-user to save appointment changes.
CaptionId Obtains the identifier of a localized string that will be displayed as the message box caption.


By default, the message box caption displays the application name. By handling the CustomizeMessageBoxCaption event you can change the caption using the CustomizeMessageBoxCaptionEventArgs.Caption property. The CustomizeMessageBoxCaptionEventArgs.CaptionId property provides you with a localized string displayed in the message box, so you can change the header text according to the text of the message.


This code snippet changes the caption of the dialog displayed on closing the appointment form which contains unsaved changes. The text in the message box is obtained from the localized resources by the SchedulerStringId.Msg_SaveBeforeClose ID.


    scheduler.CustomizeMessageBoxCaption += scheduler_CustomizeMessageBoxCaption;
public static void scheduler_CustomizeMessageBoxCaption(object sender, CustomizeMessageBoxCaptionEventArgs e) {
    if (e.CaptionId == DevExpress.XtraScheduler.Localization.SchedulerStringId.Msg_SaveBeforeClose)
        e.Caption = "Appointment modification";
See Also