Back to Devexpress

XtraBaseArgs.ContentPadding Property

windowsforms-devexpress-dot-xtraeditors-dot-xtrabaseargs-f95c8867.md

latest2.9 KB
Original Source

XtraBaseArgs.ContentPadding Property

Gets or sets the distance between the dialog (message box) content and borders.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public Padding ContentPadding { get; set; }
vb
Public Property ContentPadding As Padding

Property Value

TypeDescription
Padding

The distance between borders and dialog (message box) content.

|

Remarks

For XtraMessageBox objects, in addition to this global content setting, you can also utilize other ...Padding properties that specify paddings of individual content blocks.

csharp
XtraMessageBoxArgs args = new XtraMessageBoxArgs();
args.ButtonPadding = new Padding(30);
args.ContentPadding = new Padding(100);
args.DoNotShowAgainCheckBoxPadding = new Padding(30);
args.TextPadding = new Padding(30);
args.IconPadding = new Padding(30);

args.Icon = new Icon(@"D:\demoicon.ico");
args.Caption = "XtraMessageBox";
args.Text = "Do you really want to close the app?";
args.Buttons = new DialogResult[] { DialogResult.Yes, DialogResult.No };
args.DoNotShowAgainCheckBoxVisible = true;

XtraMessageBox.Show(args);
vb
Dim args As New XtraMessageBoxArgs()
args.ButtonPadding = New Padding(30)
args.ContentPadding = New Padding(100)
args.DoNotShowAgainCheckBoxPadding = New Padding(30)
args.TextPadding = New Padding(30)
args.IconPadding = New Padding(30)

args.Icon = New Icon("D:\demoicon.ico")
args.Caption = "XtraMessageBox"
args.Text = "Do you really want to close the app?"
args.Buttons = New DialogResult() { DialogResult.Yes, DialogResult.No }
args.DoNotShowAgainCheckBoxVisible = True

XtraMessageBox.Show(args)

See Also

XtraBaseArgs Class

XtraBaseArgs Members

DevExpress.XtraEditors Namespace