I have a simple Windows Form. In it, I've embedded a ChildXtraUserControl which derives from XtraUserControl (DevEx v10.1).
I'd like to skin the ChildXtraUserControl with 'Office 2010 Blue', and I'm expecting it to look bluish when I run the form. I've tried this two different ways but am unable to get it to work.
Attempt 1: Set the LookAndFeel in the ChildXtraUserControl, set the ChildXtraUserControl into a Windows Form Panel in the form
When I run this, I see only the Panel, which I've colored pale yellow.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
var devExUserControl = new DevExpressUserControl {Dock = DockStyle.Fill};
panel1.Controls.Add(devExUserControl);
}
}
public partial class ChildXtraUserControl : XtraUserControl
{
public ChildXtraUserControl()
{
InitializeComponent();
IntializeSkin();
}
private void IntializeSkin()
{
LookAndFeel.UseDefaultLookAndFeel = false;
LookAndFeel.UseWindowsXPTheme = false;
LookAndFeel.Style = LookAndFeelStyle.Skin;
LookAndFeel.SkinName = "Office 2010 Blue";
}
}
Attempt 2: I read on the DevEx Support Center that the ChildXtraUserControl could be in a DevExpress PanelControl, and the LookAndFeel set on the PanelControl
As before, I only see the pale yellow PanelControl. The post does seem like it was for a different DevEx version, but I thought it was worth a shot.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
panelControl1.LookAndFeel.UseDefaultLookAndFeel = false;
panelControl1.LookAndFeel.UseWindowsXPTheme = false;
panelControl1.LookAndFeel.Style = LookAndFeelStyle.Skin;
panelControl1.LookAndFeel.SkinName = "Office 2010 Blue";
var devExUserControl = new ChildXtraUserControl { Dock = DockStyle.Fill };
panelControl1.Controls.Add(devExUserControl);
}
}
public partial class ChildXtraUserControl : XtraUserControl
{
public ChildXtraUserControl()
{
InitializeComponent();
}
}
Does anyone have any ideas what I'm doing wrong? Thanks in advance.