Skip to main content
All docs
V24.2

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

XtraMessageBox.UseSkinPaddings Property

Gets or sets whether all XtraMessageBoxes should retrieve element paddings from skins.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public static bool UseSkinPaddings { get; set; }

#Property Value

Type Description
Boolean

Specifies whether all XtraMessageBoxes should retrieve element paddings from skins.

#Remarks

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

MessageBoxPaddings

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

  • Disable the static XtraMessageBox.UseSkinPaddings property (affects all message boxes in your app).
XtraMessageBox.UseSkinPaddings = false;
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