Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
On Windows 8 a window with height 23px resizes to 39px after dragging #2066
I've bumped into a peculiar issue. I've written a small application which demonstrates it: https://www.dropbox.com/s/jndzb2f5ctf8ulf/Mahapps_WindowHeight_Issue.zip?dl=0
This demo application is using MetroWindow (Mahapps Metro 1.1.2) and has a window height=23px when it starts. If you reposition the window by dragging with the mouse, the window height jumps to 39px by itself.
Also useful: 39px is the minimum window height possible when a window has a WindowStyle (I have not found any docs on that, but discovered it by trial and error). A height lower than 39px can only be achieved when WindowStyle=None.
Could it be that dragging the window suddenly restores the WindowStyle?
Edit: I've pinpointed the performance setting which causes this: "Animate windows when minimizing and maximizing"
Here some Infos about this issue:
<controls:MetroWindow x:Class="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" Title="MainWindow" BorderThickness="0" Height="23" MaxHeight="23" TitlebarHeight="23" ShowTitleBar="False" IsWindowDraggable="True" Background="Wheat" Width="400" ResizeMode="CanMinimize"> <Grid /> </controls:MetroWindow>