Bug Report B132331
Visible to All Users

Setting defaultLookAndFeel on a form causes flicker/control movement on another control

created 16 years ago

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???

Answers

created 16 years ago

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

    Comments (2)

      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?

      DevExpress Support Team 16 years ago

        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

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.