Theming a MDI child window when using DevExpress controls

If you create a new form and change its type to inherit from DevExpress.XtraEditors.XtraForm, the entire form will take on the current Default Look and Feel of the application. To make the title bar and window border also take on this theme, you must add the following line somewhere early in your code:

DevExpress.Skins.SkinManager.EnableFormSkins();

I recently discovered that when creating a child MDI form that has the XtraForm base type, it still does not take on the default theme.

The fix for this is to use the following code in the child form:

protected override bool GetAllowSkin()
{
     if (this.DesignMode) return false;
     return true;
}

5 thoughts on “Theming a MDI child window when using DevExpress controls”

Leave a reply to Jason Cancel reply