none
How to Change titlebar color? RRS feed

  • Question

  • Hi,

    In my project I want to change the color of the whole Window, including the title bar.

    But looks like WPF doesn't allow that.

    I saw some examples online about building your own title bar to do this which seems like an overkill!

    Why is there no simple way to do such a simple thing?

    Is there a way?


    Please Mark as Answered if this answers your question Or UnMark as Answered if it did not. Happy to Help :)

    Friday, May 25, 2018 9:37 AM

Answers

  • First of all I use email address and not physical address in my job applications. And not giving an interface/API to do something like this through the technology is the job of the guys who are working on it. Not having done it is not something that should be justified. 

    If WPF needs to survive, it has to evolve and make the developer life simple, rather than difficult. 


    Please Mark as Answered if this answers your question Or UnMark as Answered if it did not. Happy to Help :)

    WPF has been around for awhile. However Windows.Forms is the same with regard to the titlebar and borders. That is OS defined and with regard to programming you can not adjust that really.

    Here is a link you may want to view though WPF customizing the appearance of a window in XAML.

    You can see in below image how titlebar/border color are altered in control panel on Win7. There is no per application override for this to my knowledge.


    La vida loca

    Saturday, May 26, 2018 12:37 AM

All replies

  • The title bar is a part of Windows, not from your program. 

    Therefore it is not a function from WPF but from Win32 whatever the presentation is. 

    https://stackoverflow.com/questions/39261826/change-the-color-of-the-title-bar-caption-of-a-win32-application

    Before you write that something is simple, then try to understand the full but then really full impact of it. 

    Take a simple one. If you next time apply for a new job, then change the city name of your address to a city in another country. 

    Simple to do ain't it?


    Success
    Cor


    Friday, May 25, 2018 10:44 AM
  • First of all I use email address and not physical address in my job applications. And not giving an interface/API to do something like this through the technology is the job of the guys who are working on it. Not having done it is not something that should be justified. 

    If WPF needs to survive, it has to evolve and make the developer life simple, rather than difficult. 


    Please Mark as Answered if this answers your question Or UnMark as Answered if it did not. Happy to Help :)

    Friday, May 25, 2018 5:29 PM
  • All you have to is use WindowStyle="None" and create one to your liking.  I think you'll find that most common things in WPF are easily handled and once you create the template for your TitleBar you can use it over and over and over.

    Lloyd Sheen

    Friday, May 25, 2018 10:30 PM
  • First of all I use email address and not physical address in my job applications. And not giving an interface/API to do something like this through the technology is the job of the guys who are working on it. Not having done it is not something that should be justified. 

    If WPF needs to survive, it has to evolve and make the developer life simple, rather than difficult. 


    Please Mark as Answered if this answers your question Or UnMark as Answered if it did not. Happy to Help :)

    WPF has been around for awhile. However Windows.Forms is the same with regard to the titlebar and borders. That is OS defined and with regard to programming you can not adjust that really.

    Here is a link you may want to view though WPF customizing the appearance of a window in XAML.

    You can see in below image how titlebar/border color are altered in control panel on Win7. There is no per application override for this to my knowledge.


    La vida loca

    Saturday, May 26, 2018 12:37 AM