设置窗口形式的大小 [英] set the size of a window form
本文介绍了设置窗口形式的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在c#中设置窗口表单的大小?
How to set the size of a window form in c#?
推荐答案
请参阅此CP文章 ^ ]
另请参考 Form.Size属性 [
Refer this CP article, Windows Forms User Settings in C#[^]
Also refer to Form.Size Property[^]
您可以在Winforms窗口中设置属性窗口中size属性下的高度和宽度.您也可以使用
在代码中进行设置
In a Winforms window you can set the height and width in the properties window, under size property. You could also set this in code using
this.Height = yourHeight;
this.Width = yourWidth;
在后面的代码中;
在WPF表单中,可以使用Width
和Height
属性在窗口声明中的XAML
中进行设置,或使用上述Winforms的代码
in the code behind;
In WPF forms you can set this in the XAML
in the window declaration using Width
and Height
properties, or using code as above for Winforms
这篇关于设置窗口形式的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文