开发者

WindowStyle = "None" + ResizeMode = "NoResize" = problem

开发者 https://www.devze.com 2023-01-16 21:14 出处:网络
problem is when i set my windowstyle to none and change resizemo开发者_StackOverflow社区de to no resize, and run it, the height and width is bigger at runtimeI\'d say you\'ve either set the height and

problem is when i set my windowstyle to none and change resizemo开发者_StackOverflow社区de to no resize, and run it, the height and width is bigger at runtime


I'd say you've either set the height and width of the window to be larger than the window would automatically size to adjust to its contents. Or done the opposite.

EDIT

Ok, so considering the new information in the comments below:

The reason why the button's position has changed is because you've explicitly set the Margin of the Button to be 203 units left and 209 units down from the top left point of the containing panel (I.E. your grid; Which is why it appears where it does.

I'm unsure why the preview is incorrect in this case.


In my case the XAML tag of the Window had the Property SizeToContent="True" and all I had to do was to remove it.

0

精彩评论

暂无评论...
验证码 换一张
取 消