Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToolWindows that are per-monitor DPI aware do not react to DPI changes in Windows 11 #10422

Open
dremin opened this issue Feb 7, 2025 · 1 comment
Labels
Investigate Requires further investigation by the WPF team.

Comments

@dremin
Copy link

dremin commented Feb 7, 2025

Description

When a Window in a per-monitor DPI-aware app has WindowStyle=ToolWindow, that window does not react to changes in DPI on that monitor when running on Windows 11. It works on Windows 10.

Reproduction Steps

  1. Create a new WPF project.
  2. Create an app manifest that declares per-monitor DPI support.
  3. Create a Window with WindowStyle=ToolWindow.
  4. Run the app on Windows 11.
  5. Open Display Settings and change the DPI setting for the monitor with the window.
  6. Notice that the WPF ToolWindow is the only window on that monitor that did not scale to the new DPI setting.

Or, use the attached example: ToolWindowDpiExample.zip

Expected behavior

Making a Window have the ToolWindow style should not prevent it from scaling to DPI changes. It should scale just like a normal window, or like a ToolWindow on Windows 10.

Actual behavior

ToolWindows do not scale to DPI changes.

Regression?

No response

Known Workarounds

Manually resizing the window will cause the window to scale to the new DPI.

Impact

Windows are the wrong size and scale.

Configuration

  • Windows 11 (all versions)
  • .NET 6 and .NET 8
  • x64, ARM64

The issue does not occur when changing to Windows 10.

Other information

No response

@lindexi
Copy link
Member

lindexi commented Feb 7, 2025

It seems the WS_EX_TOOLWINDOW 's issues. But I am not sure.

@dipeshmsft dipeshmsft added the Investigate Requires further investigation by the WPF team. label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Investigate Requires further investigation by the WPF team.
Projects
None yet
Development

No branches or pull requests

3 participants