windowsforms-devexpress-dot-xtraeditors-dot-xtramessagebox-3b07fb39.md
Gets or sets whether the message box is painted using its own look and feel settings.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public static bool AllowCustomLookAndFeel { get; set; }
Public Shared Property AllowCustomLookAndFeel As Boolean
| 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.
|
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);
'configuring the UserLookAndFeel
Dim lookAndFeelError As New UserLookAndFeel(Me)
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