0

I love WPF but I'm in trouble.

Everything is very customizable but I didn't found anything valid for personalizing title Bar and Application borders.

I've understand that isn't possible to customize it directly because it's Windows that manage that, but otherwise I didn't found any valid solutions...

The only results that show up from google are using WindowChrome, but I think it's a VERY outdated solution.

Otherwise I only found THIS code snippet, but it is (for me, at least) a bit complicated to understand fully. Also, I've tried it but it doesn't allow to do some actions, like move window when maximized, but a lot of application (done in WPF) that I saw daily are able to do that.

In final word I can't find anything good.

I think WPF is very used even today, and I really don't understand how they do good looking solutions, that doesn't involve using a 2009 library.

Alex DG
  • 97
  • 1
  • 6
  • 1
    The answer is still the same the OS controls the appearance of the OS window, so the only solution is to remove the OS window and build your own – MikeT Aug 01 '17 at 12:15
  • As @MikeT suggests, that's the best answer. On that path look at https://stackoverflow.com/questions/15413263/how-to-make-title-bar-disappear-in-wpf-window – kenny Aug 01 '17 at 12:18
  • @kenny the problem is that hiding title bar is very easy, but "build your own" control is very hard. The code linked in my question (one of the very few I've found online) is lacking a lot of features, therefore is a lot complex. – Alex DG Aug 01 '17 at 12:21
  • @AlexDG yeah, but it's not that bad to add the features you need. Which are you looking for? – kenny Aug 01 '17 at 12:25
  • one example https://stackoverflow.com/questions/7417739/make-wpf-window-draggable-no-matter-what-element-is-clicked – kenny Aug 01 '17 at 12:26
  • I've tried the second example I've posted ([THIS](https://code.msdn.microsoft.com/WPF-styling-a-Window-in-fcf4e4ce)); it override whole 'Window' WPF element style with custom code. It's working good, except that give my application a lot of problem when resizing, probably because I've a lot of path in my windows and the extra code has some kind of destructive impact on performance, but I guess that is another separate issues... I can try to recreate manually the Title Bar with a custom Stackpanel and adding to it all functions I want. Kinda annoying but... – Alex DG Aug 02 '17 at 08:09

1 Answers1

1

You should get started with the docs. That sample you linked to will make more sense after that.

Basically, you are asking OS that you own the entire region and will take care of ensuring everything continues to behave as expected.

Tanveer Badar
  • 5,438
  • 2
  • 27
  • 32