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.v18.2.dll

Declaration

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.

Remarks

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.

Example

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.

CustomizeMessageBoxCaption

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

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CustomizeMessageBoxCaption event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also