Skip to main content

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.AllowCustomLookAndFeel Property

Gets or sets whether the message box is painted using its own look and feel settings.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public static bool AllowCustomLookAndFeel { get; set; }

#Property Value

Type Description
Boolean

true if the message box is painted using its own look and feel settings; false if the default look and feel settings are used.

#Remarks

The code below illustrates how to force Message Boxes to use a custom look and feel.

//configuring the UserLookAndFeel 
UserLookAndFeel lookAndFeelError = new UserLookAndFeel(this);
lookAndFeelError.SkinName = "MyCustomSkin";
lookAndFeelError.Style = LookAndFeelStyle.Skin;
lookAndFeelError.UseDefaultLookAndFeel = false;

// force Message Boxes to use the "MyCustomSkin"
XtraMessageBox.AllowCustomLookAndFeel = true; 

// pass the UserLookAndFeel as a Parameter in the show method
XtraMessageBox.Show(lookAndFeelError, "Error", "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Error);
See Also