We have a form (call it Form A) that has on it many DevExpress controls, in particular a grid and some labels and text boxes on a group box on a panel.
On Form A, we have code hooked up to the grid DoubleClick that opens another form (call it Form B).
Form B inherits from a form (call it Form C) that has on it a DevExpress defaultLookAndFeel control.
The first time we double click and opone form B all is well. From then on when we do so when the line in FormC.designer.cs.InitializeComponent
this.defaultLookAndFeel = new DevExpress.LookAndFeel.DefaultLookAndFeel(this.components);
is called, something weird happens with the controls on formA they seem to move position slightly (text boxes) and some change style (scroll bars), and then after Form B is finished loading all is well again. it['s very noticable and pretty horrible looking.
Any ideas???
Setting defaultLookAndFeel on a form causes flicker/control movement on another control
Answers
Hello Krishna,
This is a limitation of using the DefaultLookAndFeel component. We advise that you use the solution explained in the following Knowledge Base article:
What is the best way to set the same Look-and-Feel style of the entire application with DXperience for Windows Forms?
Thanks,
Nick
Thanks, hadn't seen that one before.
We also have User Controls (containing Dev Express controls and other user controls) using the defaulLookAndFeel component in the same way as the forms (these controls get embedded in external apps) - presumably this solution will take care of those also?
Hi Krishna,
Yes, exactly the same approach is applicable to user controls (XtraUserControl). Please make sure to assign the DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName property when your application is launched at runtime. To set the skin for the designer, use the DXDesignKeys tool.
Thanks,
Nick