Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

XtraInputBoxArgs.Prompt Property

Gets or sets the text to display in the dialog box.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public string Prompt { get; set; }

#Property Value

Type Description
String

A string value that specifies the text to display in the dialog box.

#Remarks

Use the Prompt property to specify the text displayed above the dialog box editor. To provide an editor, use the XtraInputBoxArgs.Editor property.

The code snippet below shows how to display the dialog box using custom arguments.

// initialize a new XtraInputBoxArgs instance 
XtraInputBoxArgs args = new XtraInputBoxArgs();
// set required Input Box options 
args.Caption = "Shipping options";
args.Prompt = "Delivery date";
args.DefaultButtonIndex = 0;
// initialize a DateEdit editor with custom settings 
DateEdit editor = new DateEdit();
editor.Properties.CalendarView = DevExpress.XtraEditors.Repository.CalendarView.TouchUI;
editor.Properties.Mask.EditMask = "MMMM d, yyyy";
args.Editor = editor;
// a default DateEdit value 
args.DefaultResponse = DateTime.Now.Date.AddDays(3);
// display an Input Box with the custom editor 
var result = XtraInputBox.Show(args).ToString();

When an end-user clicks “OK” or “Yes”, the XtraInputBox.Show method returns an Object that is the editor’s edit value. Otherwise, the method returns null (Nothing in VB).

See Also