locked
Changing color of TitleBar RRS feed

  • Question

  • How do i Change the color of TitleBar of Form in XP theme.
    It Changes perfectly in Classic theme using SetsysColors but it does not change in XP theme.
    Any particular reason? I mean if O.S is doing that, there has to be a function for it..

    Thursday, July 10, 2008 11:58 AM

Answers

  • wpf has no control the title bar color. If you want to do so then you need to create your own title bar.

    Thursday, July 10, 2008 1:20 PM
  • -> It Changes perfectly in Classic theme using SetsysColors but it does not change in XP theme.

    I think you mean that the color you set through SetSysColors stays the same after chaing the system to XP theme, right?

    If this is the case, you should be able to retrieve the default color before calling SetSysColors through GetSysColors, and when theme is changed, you could revert back to the default color by calling SetSysColors again passing the default color you get from GetSysColors.

    Hope this helps
    Monday, July 14, 2008 8:05 AM

All replies

  • wpf has no control the title bar color. If you want to do so then you need to create your own title bar.

    Thursday, July 10, 2008 1:20 PM
  • -> It Changes perfectly in Classic theme using SetsysColors but it does not change in XP theme.

    I think you mean that the color you set through SetSysColors stays the same after chaing the system to XP theme, right?

    If this is the case, you should be able to retrieve the default color before calling SetSysColors through GetSysColors, and when theme is changed, you could revert back to the default color by calling SetSysColors again passing the default color you get from GetSysColors.

    Hope this helps
    Monday, July 14, 2008 8:05 AM