Blank space when system's scale changed

Lukáš Koten 1 Reputation point
2020-04-03T07:29:53.833+00:00

When I dock simple WPF window to right or left side (scale set to 125% or higher) and then return the system scale to original value 100% an ugly blank space appears at the bottom of the window as you can see here:

7012-1q2we31qwe.png

The WPF application is newly created with no change in code (pre-generated).

<Window x:Class="TestScale.MainWindow"  
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"  
        xmlns:local="clr-namespace:TestScale"  
        mc:Ignorable="d"  
        Title="MainWindow" Height="450" Width="800">  
    <Grid>  
  
    </Grid>  
</Window>  

The application is running on 4.7.1 .Net framework but i get the same result even with .net core wpf.

Is this the default behavior? All other applications I've tried seems to behave correctly (they are downsized). For me it seems that the Window has some problem with Measure/Arrange when the scale is changed and the window is docked to side.

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,686 questions
{count} votes