Skip to main content
A newer version of this page is available. .
All docs
V21.2

XtraMessageBoxArgs.UseSkinPaddings Property

Gets or sets whether message boxes that utilize this XtraMessageBoxArgs object should retrieve content paddings from the current DevExpress skin.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v21.2.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Navigation

Declaration

public DefaultBoolean UseSkinPaddings { get; set; }

Property Value

Type Description
DefaultBoolean

Specifies whether to retrieve message box paddings from skins. The Default value means the behavior is inherited from the global XtraMessageBox.UseSkinPaddings property.

Available values:

Name Description
True

true. DefaultBoolean.True has a constant value of 0, while the standard true value corresponds to a value of 1. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

False

false. DefaultBoolean.False has a constant value of 1, while the standard false value corresponds to a value of 0. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

Default

The default behavior determined by the control’s logic.

Remarks

DevExpress skins store element paddings that increase the empty area around message box content blocks.

MessageBoxPaddings

To disable skin paddings or modify padding values, do one of the following.

XtraMessageBox.UseSkinPaddings = false;
  • Disable the XtraMessageBoxArgs.UseSkinPaddings property (affects message boxes that use this XtraMessageBoxArgs object).
XtraMessageBoxArgs args = new XtraMessageBoxArgs();
args.UseSkinPaddings = false;
XtraMessageBox.Show(args);
  • Change ...Padding properties of the XtraMessageBoxArgs object to set up custom padding sizes for individual content blocks.
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);
  • Create a custom skin in WinForms Skin Editor and modify values of “Message Box Paddings” group properties.
See Also