windowsforms-devexpress-dot-xtraeditors-dot-xtrabaseargs-13af9f00.md
Gets or sets buttons that the shown object (XtraMessageBox, XtraInputBox, etc.) has.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public DialogResult[] Buttons { get; set; }
Public Property Buttons As DialogResult()
| Type | Description |
|---|---|
| DialogResult[] |
An array of owner buttons.
|
The code below shows the XtraInputBox with “OK”, “Cancel” and “Retry” buttons. The “Retry” button is a default button - if a user presses Enter when the input box is shown, the input box closes and returns DialogResult.Retry.
XtraInputBoxArgs xia = new XtraInputBoxArgs();
(xia as XtraBaseArgs).Buttons = new DialogResult[] {
DialogResult.OK, DialogResult.Cancel, DialogResult.Retry };
xia.DefaultButtonIndex = 2;
xia.Caption = "User not found. Enter a valid user name.";
XtraInputBox.Show(xia);
Dim xia As New XtraInputBoxArgs()
TryCast(xia, XtraBaseArgs).Buttons = New DialogResult() {
DialogResult.OK, DialogResult.Cancel, DialogResult.Retry }
xia.DefaultButtonIndex = 2
xia.Caption = "User not found. Enter a valid user name."
XtraInputBox.Show(xia)
See Also