WpfAppBar icon indicating copy to clipboard operation
WpfAppBar copied to clipboard

Windows Display Zoom Set above 100%

Open SConnely opened this issue 4 years ago • 2 comments

When the Windows Display Zoom is Set above 100% and you Set the Edge to the Right the AppBar will completely disappear off-screen.

SConnely avatar Sep 30 '20 16:09 SConnely

I'm having a similar problem. My left monitor is set to 125% zoom, my right monitor (the main one) is set to 100% zoom, and when I snap a window the the left edge of the left monitor, the required width is miscalculated. This is not the case if I set the zoom of the left monitor to 100%.

sammhicks avatar Oct 09 '20 18:10 sammhicks

If it helps, I managed to get my program to work by changing AppBarFunctions.cs

Line 202: from barData.rc.right = barData.rc.left + (int)Math.Round(sizeInPixels.X); to barData.rc.right = barData.rc.left + (int)Math.Round(1.25 * sizeInPixels.X);

Line 234: from (barData.rc.right - barData.rc.left), to (barData.rc.right - barData.rc.left) / 1.25,

Hopefully this will help :)

EDIT - With further testing, this doesn't work if there's already a window docked to the left of the left monitor.

sammhicks avatar Oct 09 '20 20:10 sammhicks