0

I'm trying to make the title bar of a WPF main window automatically adjust its size to the DPI scaling of the monitor that's showing the application.

Unfortunately, I couldn't find anything useful on the internet other than the official example application in WPF-Samples/PerMonitorDPI on GitHub.

The title bar doesn't change its size even in the given application sample.

How to reproduce:

  1. Start the WPF application sample (see link above).
  2. Drag the application window to a higher-scaled screen (200%).
  3. Notice the small title bar of the application window. Everything else scales bigger but not the title bar.
ironsight
  • 1
  • 3
  • Is it possible to set the height of your framework title bar element to Auto? Without more information or any code to go on, we're just going to be guessing. – bigcrazyal Jun 02 '23 at 12:49
  • Why don't you follow the official sample? [Turn on Windows level Per monitor DPI awareness in app.manifest](https://github.com/Microsoft/WPF-Samples/tree/master/PerMonitorDPI#1turn-on-windows-level-per-monitor-dpi-awareness-in-appmanifest) – emoacht Jun 02 '23 at 18:29

0 Answers0