Open Grey-Wind opened 1 week ago
As far as I can see everything seems to be working as expected. The Width
and Height
properties on Window
include the borders and caption/title bar. That's why None
window style meets your expectations, because the content area is not decreased by them. When you set the same dimensions on the child, it does not fit the window and will be cropped, exactly how the designer shows you. You can use SizeToContent=true
to resize the window automatically to fit all of the content.
Are you simply trying to align the label to the right bottom corner? Why use the Margin
instead of the HorizontalAlignment
and VerticalAlignment
?
I am used to using margin in my daily life. Since there is no need to develop very large software, margin does not affect normal development except for this display problem.
Description
The WPF window does not look the same in design mode as it does when built.
The window style is
SingleBorderWindow
orThreeDBorderWindow
.I don't know if this will be a problem in
ToolWindow
styleReproduction Steps
Create a WPF project and build.
You can add a test label.
Expected behavior
The contents on the right and bottom are displayed completely.
Actual behavior
The content on the right and below is incomplete or cropped.
Regression?
I didn't test the older version.
Known Workarounds
Use the
None
window style.Impact
No response
Configuration
.net6 to .net8
windows10 22h2
any cpu
Other information
Video_CN
Video_EN
The project in the video is .net8