Ticket T1023630
Visible to All Users

How to change the appearance for only a specific form

created 4 years ago (modified 4 years ago)

[DevExpress Support Team: CLONED FROM T160334: How to change title bar color programmatically?]

hi :
thanks for your help.
I have a question:
In the above case, all the form styles in the program have been changed after I applied the LookAndFeel.UpdateStyleSettings() method.I don't want this.
I just want to change the form caption background color in a specific form (such as login form).
In order to achieve this effect, I temporarily set FormBorderStyle = FormBorderStyle.None, but this is obviously not the final solution. is there any other way? thank you.

I look forward to your reply
Best regards.

Answers approved by DevExpress Support

created 4 years ago

Hello,

You can create a custom skin and apply it only to a specific from as descried in this topic: How to: Customize Look And Feel of Specific Control(s).

Should you have further questions, feel free to contact me. I will be happy to follow up.

    Show previous comments (3)
    DevExpress Support Team 4 years ago

      Thank you for the clarification. This behavior takes place because you are using the same skin for all forms in your case. Thus, your code is applied to all forms where this skin is used. You need to create another custom skin and use it only for your form.
      Alternatively, you can create a custom FormPainter for this form and override the DrawBackground method. In this method, you can draw the background as you need. Refer to the following thread for more information: Change background of the title bar in a XtraForm.

      Should you have further questions, feel free to contact me. I will be happy to follow up.

        hi Nadezhda:
        thanks for your help.
        the problem is solved perfectly :)
        thank you!

        DevExpress Support Team 4 years ago

          You are welcome!

          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.