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

XtraInputBox.Show(XtraInputBoxArgs) Method

Displays a dialog box using the specified arguments.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.1.dll

Declaration

public static object Show(
    XtraInputBoxArgs args
)

Parameters

Name Type Description
args XtraInputBoxArgs

An XtraInputBoxArgs object that comprises dialog box settings.

Returns

Type Description
Object

An Object that represents the dialog box editor’s edit value if the OK or Yes button is clicked; otherwise, null (Nothing in VB).

Remarks

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”, this Show method returns an Object that is the editor’s edit value. Otherwise, the method returns null (Nothing in VB).

See Also