WPF, suspicious window size: 400 = 100 + 300 + 22 ??? really

JerryM 1,121 Reputation points
2021-05-17T14:24:50.64+00:00

Hi,

I am using MS VS 2019 v16.9.5, C#/WPF and I can not understand to window size. See the picture below. Height of whole window is 400pixels - the label 400 is on the right side of the window. Inside the client area of my window is a grid with 2 rows with heights 100 and 300 pixels. This is clearly visible on the left side of my image below. My window has a title bar with height 22 pixels. The biggest problem is that I can not understand how 100 + 300 + 22 = 400. Is there someone responsible who can explain me it ?
Jerry

97135-final.jpg

XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
786 questions
0 comments No comments
{count} votes

Accepted answer
  1. JerryM 1,121 Reputation points
    2021-05-18T07:03:03.363+00:00

    I am sorry but according to mechanical engineering drawing standards/rules the WPF visual designer shows wrong sizes. MS should correct/repair this terrible mistake.

    http://www.pages.drexel.edu/~rcc34/Files/Teaching/MEM201%20L5-Fa0809-SpDimensions_RC.pdf
    http://www.jaist.ac.jp/nmcenter/mshop/mshp/pdf/MDWfull_E.pdf

    and also ISO/EN rules:
    https://www.iso.org/ics/01.100.20/x/

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Sam of Simple Samples 5,521 Reputation points
    2021-05-17T19:20:02.463+00:00

    Look at your Window element; the element first in the XAML. It has Height="400".

    0 comments No comments