dotnet / dotnet/wpf

WPF Window is broken on Widows 10

Open
#3,747 0 comments 1 reaction 0 assignees View on GitHub
.NET Framework Bug
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity2.visualstudio.com/t/WPF-Window-is-broken-on-Widows-10/718748)._

---
Hi,

I realized the following issues on WPF Windows on a blank new Projekt.
1. Tooltips on Window Min, Max and Close render a black stripe

2. When setting a MaxWidth and MaxHeight on a Window the AcualWidth and ActualHeight of the Window is equal the MaxWidth and MaxHeight, But when talking a Screenshot of the Window wIth Screenscaling 100% the Window is 14px smaller in Width and 7 px in Height. I guess it is the 7 px Dropshadow of the Theme. This behaviour is new in Windows 10 in other Versions of Windows the Shadow was not Part of the Window

3. Windows with MaxWidth and MaxHeight break WindowStates and Aero-Snap Features(Win + ArrowKey)
If I dock Window to the reft or right Edge of the screen with Win+Left or Win+Right I get a Window that is exacly the wide I specified. So now the 14px from Issue 2 are missing But now the content of the Window is 16px smaller than it should be so i get uggly 16px of Black within the window

4. If I open a Window with MaxWidth and MaxHeight applied (400px by 400px) in the center of the screen and I Maximize it with Win+Up It gets placed to the TopLeft of the screen. Ok. But If I now Press Win+Down In order to restore the state It is not moved back to the center of the screen.... It gets moved some pixels of the TopLeft Corner of the screen and I see the 16px of Black inside the window again. WindowButton show me that the window is out of maximized state. When I now press Win+Down to minimize the Window, it is moved a few pixel to the right and a few pixels down and the width and height changes a bit... but I can not minimize this window.

5. When changing the Windowstyle to Toolwindow with MaxWidth and MaxHeight applied (400px by 400px) I can Maximize the Window by using Win+UpArrow, but I can not Restore the state by Win+Down.

6. When you maximize a window that has MaxWidth and MaxHeight applied and than click on Minimize Button. The Animation is playing from TopRight into the Taskbar. Good. You can get the ANimation to play from Top/Right of the screen even if your window is on a total different position.

Steps to reproduce:
1. Start a Window with MaxHeight/MaxWidth applied in the center of the screen.
2.Hit Maximize Window Button so it moves to Top/Left
3. Hit Restore so the Window is back in the center of the screen
4. Now hit Minimize Button.

The animation is played from TopLeft to Toolbar but the original window was in center of screen.

Please fix this.

Also please improve the situation for people that need to calculate the contentsize out of a window size. On other verions of windows it was easier because you could get information like cation and border size of a window depending on the theme via SystemParameters. But where are these kind of info for the dropshadow of a window for example? What theme is using what size of shadow?. What SystemParameters need to be used in what windowstate on what version of windows 10? Documentation for this? Come on and give us some love

---
### Original Comments

#### Feedback Bot on 9/2/2019, 01:53 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

#### Feedback Bot on 10/8/2019, 05:25 PM:

I have detected that for the last 35 days, this issue didn't have any product team activity and a very small amount of new votes or comments. Based on this, its severity, and affected area, it’s my experience that this issue is very unlikely to be fixed.

---
### Original Solutions
(no solutions)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.