Forums
Forums are Read-Only. Use the new Support Center. To start a general discussion, use the General category when submitting your question.

button Skins

Last post 7/3/2009 2:54 AM by burak güven. 9 replies.
Sort Posts: Previous Next
  • burak güven

    button Skins

    7/2/2009 3:08 AM
    • Not Ranked
    • Joined on 6/12/2009
    • Posts 8

    Hi everyone,

    I got a dekstop application that has many pages in it. I have to apply a skin to all of the pages so i use a lookAndFeel component. All of the pages and all of the components are applying this skin very well. But i got some buttons that i don't want to apply my default skin. So i change the buttons' skin from their lookAndFeel property. But it doesn't work. Everytime i compile my application, my buttons apply my default skin, not the one i manually select. Can anybody help me ? Thanx...

  • Holger Persch [DX-Squad]

    Re: button Skins

    7/2/2009 5:24 AM
    • Top 50 Contributor
    • Joined on 5/7/2007
    • Germany
    • Posts 1,010

    Hi,

    Do you want to apply one skin to the whole application, that means to all forms and controls?

    If yes then remove all LookAndFeel components and ensure that the LookAndFeel.UseDefaultLookAndFeel property of all forms and controls is set to true.

    Also put the following code into the Main method of your application to apply e.g. the "Black" skin to the whole application:

            static void Main()
            {
                DevExpress.Skins.SkinManager.EnableFormSkins();
                DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("Black");

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Form1());
            }
     

    Holger Persch [DX-Squad]
  • burak güven

    Re: button Skins

    7/2/2009 5:45 AM
    • Not Ranked
    • Joined on 6/12/2009
    • Posts 8

     Hi , thx for your reply. I think i meant something wrong ? I already an lookAndFeel control that applies my whole application. What i want to do is: in some particular forms, i got some controls and i need them to have different skin then the default one.

    Here is my situation again:

    I got a defaultLookAndFeel component that applies whole application. Nothing wrong with this. For example  i got 3 different form and they all apply my default skin. Nothing wrong again. But in the first form, i got a button and it normally applies the default look and feel skin. But i don't want this. i want my button to have office 2007 blue skin while my default look and feel component's skin is office 2007 black. my buttons look and Feel properties are:

    SkinName = office 2007 blue
    Skin = 3D Style
    UseDefaultLookAndFeel = False
    UseWindowsStyle = False

    But this doesn't work. Everytime when i compile my project, my button applies my default look and feel component. What am i doing wrong ?

  • Holger Persch [DX-Squad]

    Re: button Skins

    7/2/2009 6:01 AM
    • Top 50 Contributor
    • Joined on 5/7/2007
    • Germany
    • Posts 1,010

    Hi,

    I think you will have to remove the DefaultLookAndFeel component.

    Please have a look into the attached sample project.

    Holger Persch [DX-Squad]
  • burak güven

    Re: button Skins

    7/2/2009 6:40 AM
    • Not Ranked
    • Joined on 6/12/2009
    • Posts 8

     Thanx for your replies. I really cannot remove defaultLookAndFeel component. Could do it at the start of the project, but not now :)   i prefer applying skins via coding. Thanx, have a nice day..

  • Brendon Muck [DX Squad]

    Re: button Skins

    7/2/2009 9:40 AM
    • Top 10 Contributor
    • Joined on 5/16/2007
    • Buffalo, NY
    • Posts 6,154

    Are you setting the "UseDefaultLookAndFeel" property for these SimpleButtons to False?

    MySimpleButton.LookAndFeel.UseDefaultLookAndFeel = false;

    Please do not email me directly for support. Use the Support Center or Community Forums so that everyone may benefit.
  • burak güven

    Re: button Skins

    7/2/2009 9:49 AM
    • Not Ranked
    • Joined on 6/12/2009
    • Posts 8

     Yes, in my second post i told how i set my buttons' lookAndFeel properties. I mean i tried it, it doesn't work also. Thanx.

  • Brendon Muck [DX Squad]

    Re: button Skins

    7/2/2009 9:55 AM
    • Top 10 Contributor
    • Joined on 5/16/2007
    • Buffalo, NY
    • Posts 6,154

    Strange, it works fine for me.

    Please do not email me directly for support. Use the Support Center or Community Forums so that everyone may benefit.
  • Holger Persch [DX-Squad]

    Re: button Skins

    7/3/2009 2:17 AM
    • Top 50 Contributor
    • Joined on 5/7/2007
    • Germany
    • Posts 1,010

    It works for me too.

    Maybe you can post a sample?

    Holger Persch [DX-Squad]
  • burak güven

    Re: button Skins

    7/3/2009 2:54 AM
    • Not Ranked
    • Joined on 6/12/2009
    • Posts 8

     hi, i really gave it up :) i am done :) i wrote my code and it works perfect. Thanx for your interests. Have a nice day...

More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.